@@ -3,48 +3,29 @@ name: Testing taskiq-aio-pika
3
3
on : push
4
4
5
5
jobs :
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
35
15
runs-on : ubuntu-latest
36
16
steps :
37
17
- uses : actions/checkout@v2
18
+ - name : Install poetry
19
+ run : pipx install poetry
38
20
- name : Set up Python
39
- uses : actions/setup-python@v2
21
+ uses : actions/setup-python@v4
40
22
with :
41
23
python-version : " 3.9"
24
+ cache : " poetry"
42
25
- 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 }}
48
29
pytest :
49
30
services :
50
31
rabbit :
@@ -66,17 +47,14 @@ jobs:
66
47
runs-on : " ubuntu-latest"
67
48
steps :
68
49
- uses : actions/checkout@v2
50
+ - name : Install poetry
51
+ run : pipx install poetry
69
52
- name : Set up Python
70
- uses : actions/setup-python@v2
53
+ uses : actions/setup-python@v4
71
54
with :
72
55
python-version : " ${{ matrix.py_version }}"
73
- - name : Update pip
74
- run : python -m pip install -U pip
75
- - name : Install poetry
76
- run : python -m pip install poetry
56
+ cache : " poetry"
77
57
- name : Install deps
78
58
run : poetry install
79
- env :
80
- POETRY_VIRTUALENVS_CREATE : false
81
59
- name : Run pytest check
82
60
run : poetry run pytest -vv -n auto --cov="taskiq_aio_pika" .
0 commit comments