Skip to content

Commit f63e40a

Browse files
committed
Split out linting.
1 parent 5266fa8 commit f63e40a

File tree

1 file changed

+38
-15
lines changed

1 file changed

+38
-15
lines changed

.github/workflows/python.yml

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,62 @@ on:
44
workflow_dispatch:
55

66
jobs:
7-
test:
7+
lint:
88
runs-on: ubuntu-latest
9-
strategy:
10-
matrix:
11-
python-version: [3.8, 3.9, "3.10", "3.11"]
129

1310
steps:
14-
- uses: actions/checkout@v2.3.4
11+
- uses: actions/checkout@v3
1512
with:
1613
fetch-depth: 1
1714

18-
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v2.1.4
20-
with:
21-
python-version: ${{ matrix.python-version }}
22-
2315
- name: Install Poetry
24-
uses: abatilo/actions-poetry@v2.1.6
25-
with:
26-
poetry-version: 1.6.1
16+
run: pipx install poetry
2717

2818
- name: Set Poetry config
2919
run: |
30-
poetry config virtualenvs.path ~/.virtualenvs${{ matrix.python-version }}
20+
poetry config virtualenvs.path ~/.virtualenvs3.11
21+
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v3
24+
with:
25+
python-version: 3.11
26+
cache: "poetry"
3127

3228
- name: Install dependencies
3329
run: poetry install
3430

3531
- name: ruff check
3632
run: poetry run ruff check .
3733

38-
- name: mypy
34+
- name: mypy check
3935
run: poetry run mypy django_unicorn
4036

37+
test:
38+
runs-on: ubuntu-latest
39+
strategy:
40+
matrix:
41+
python-version: [3.8, 3.9, "3.10", "3.11"]
42+
43+
steps:
44+
- uses: actions/checkout@v3
45+
with:
46+
fetch-depth: 1
47+
48+
- name: Install Poetry
49+
run: pipx install poetry
50+
51+
- name: Set Poetry config
52+
run: |
53+
poetry config virtualenvs.path ~/.virtualenvs${{ matrix.python-version }}
54+
55+
- name: Set up Python ${{ matrix.python-version }}
56+
uses: actions/setup-python@v3
57+
with:
58+
python-version: ${{ matrix.python-version }}
59+
cache: "poetry"
60+
61+
- name: Install dependencies
62+
run: poetry install -E minify
63+
4164
- name: Run all tests
4265
run: poetry run nox

0 commit comments

Comments
 (0)