Skip to content

Commit 148fd38

Browse files
committed
Updated CI.
Signed-off-by: Pavel Kirilin <[email protected]>
1 parent 4e9836a commit 148fd38

File tree

1 file changed

+20
-42
lines changed

1 file changed

+20
-42
lines changed

.github/workflows/test.yml

Lines changed: 20 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,29 @@ name: Testing taskiq-aio-pika
33
on: push
44

55
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
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
services:
5031
rabbit:
@@ -66,17 +47,14 @@ jobs:
6647
runs-on: "ubuntu-latest"
6748
steps:
6849
- uses: actions/checkout@v2
50+
- name: Install poetry
51+
run: pipx install poetry
6952
- name: Set up Python
70-
uses: actions/setup-python@v2
53+
uses: actions/setup-python@v4
7154
with:
7255
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"
7757
- name: Install deps
7858
run: poetry install
79-
env:
80-
POETRY_VIRTUALENVS_CREATE: false
8159
- name: Run pytest check
8260
run: poetry run pytest -vv -n auto --cov="taskiq_aio_pika" .

0 commit comments

Comments
 (0)