-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (47 loc) · 1.28 KB
/
ci.yaml
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
name: Run tests
on: [pull_request]
jobs:
test:
runs-on: ubuntu-latest
services:
rabbitmq:
image: rabbitmq:3.8
ports:
- 5672:5672
redis:
image: redis:6.0
ports:
- 6379:6379
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
with:
python-version: 3.9.15
- uses: abatilo/[email protected]
with:
poetry-version: 1.4.2
- name: Install dependancies
run: |
poetry install
- name: Lint
run: |
poetry run black --check .
poetry run isort -c .
poetry run mypy .
poetry run flake8
- name: Test
run: |
poetry run pytest
- name: Check formatting
# Lints/tests should always run, even if other lints/tests have failed.
if: success() || failure() && steps.install-deps.outcome == 'success'
run: |
poetry run ruff format --check
- name: Lint
if: success() || failure() && steps.install-deps.outcome == 'success'
run: |
poetry run ruff check
- name: Run tests
if: success() || failure() && steps.install-deps.outcome == 'success'
run: |
poetry run pytest -vv