-
Notifications
You must be signed in to change notification settings - Fork 4
64 lines (53 loc) · 1.35 KB
/
run-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Test
on:
push:
branches: [master, devel]
pull_request:
branches: [master, devel]
jobs:
test:
runs-on: ubuntu-latest
services:
mysql:
image: "mysql:8.0"
ports:
- "3306:3306"
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 10
env:
MYSQL_RANDOM_ROOT_PASSWORD: yes
MYSQL_TCP_PORT: 3306
MYSQL_USER: "test"
MYSQL_PASSWORD: "test"
MYSQL_DATABASE: "study_notify"
porch:
image: "ghcr.io/wtsi-npg/python-3.10-npg-porch-2.0.0"
ports:
- "8081:8081"
options: >-
--health-cmd "curl -f http://localhost:8081"
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v4
- name: Install Poetry
run: |
pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: 'x64'
- name: Run poetry install
run: |
poetry env use '3.11'
poetry install
- name: Run pytest
run: |
poetry run pytest
- name: Run linter (ruff)
run: |
poetry run ruff check --output-format=github .