@@ -3,48 +3,29 @@ name: Testing taskiq
33on : push
44
55jobs :
6- black :
7- runs-on : ubuntu-latest
8- steps :
9- - uses : actions/checkout@v2
10- - name : Set up Python
11- uses : actions/setup-python@v2
12- with :
13- python-version : " 3.9"
14- - name : Install deps
15- uses : knowsuchagency/poetry-install@v1
16- env :
17- POETRY_VIRTUALENVS_CREATE : false
18- - name : Run black check
19- run : poetry run black --check .
20- flake8 :
21- runs-on : ubuntu-latest
22- steps :
23- - uses : actions/checkout@v2
24- - name : Set up Python
25- uses : actions/setup-python@v2
26- with :
27- python-version : " 3.9"
28- - name : Install deps
29- uses : knowsuchagency/poetry-install@v1
30- env :
31- POETRY_VIRTUALENVS_CREATE : false
32- - name : Run flake8 check
33- run : poetry run flake8 --count .
34- mypy :
6+ lint :
7+ strategy :
8+ matrix :
9+ cmd :
10+ - black
11+ - flake8
12+ - isort
13+ - mypy
14+ - autoflake
3515 runs-on : ubuntu-latest
3616 steps :
3717 - uses : actions/checkout@v2
18+ - name : Install poetry
19+ run : pipx install poetry
3820 - name : Set up Python
39- uses : actions/setup-python@v2
21+ uses : actions/setup-python@v4
4022 with :
4123 python-version : " 3.9"
24+ cache : " poetry"
4225 - name : Install deps
43- uses : knowsuchagency/poetry-install@v1
44- env :
45- POETRY_VIRTUALENVS_CREATE : false
46- - name : Run mypy check
47- run : poetry run mypy .
26+ run : poetry install
27+ - name : Run lint check
28+ run : poetry run pre-commit run -a ${{ matrix.cmd }}
4829 pytest :
4930 permissions :
5031 checks : write
@@ -57,22 +38,19 @@ jobs:
5738 runs-on : " ${{ matrix.os }}"
5839 steps :
5940 - uses : actions/checkout@v2
41+ - name : Install poetry
42+ run : pipx install poetry
6043 - name : Set up Python
61- uses : actions/setup-python@v2
44+ uses : actions/setup-python@v4
6245 with :
6346 python-version : " ${{ matrix.py_version }}"
64- - name : Update pip
65- run : python -m pip install -U pip
66- - name : Install poetry
67- run : python -m pip install poetry
47+ cache : " poetry"
6848 - name : Install deps
6949 run : poetry install
70- env :
71- POETRY_VIRTUALENVS_CREATE : false
7250 - name : Run pytest check
7351 run : poetry run pytest -vv -n auto --cov="taskiq" .
7452 - name : Generate report
75- run : coverage xml
53+ run : poetry run coverage xml
7654 - name : Upload coverage reports to Codecov with GitHub Action
7755 uses : codecov/codecov-action@v3
7856 if : matrix.os == 'ubuntu-latest' && matrix.py_version == '3.9'
0 commit comments