Skip to content

Commit daaa70f

Browse files
committed
Add lint variable.
1 parent 3edc887 commit daaa70f

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

.github/workflows/python.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
name: Python
2+
23
on:
34
push:
45
workflow_dispatch:
56

7+
env:
8+
LINT_PYTHON_VERSION: 3.11
9+
610
jobs:
711
lint:
812
runs-on: ubuntu-latest
@@ -13,16 +17,14 @@ jobs:
1317
fetch-depth: 1
1418

1519
- name: Install Poetry
16-
run: pipx install poetry
17-
18-
- name: Set Poetry config
1920
run: |
20-
poetry config virtualenvs.path ~/.virtualenvs3.11
21+
pipx install poetry
22+
poetry config virtualenvs.path ~/.virtualenvs${{ env.LINT_PYTHON_VERSION }}
2123
22-
- name: Set up Python ${{ matrix.python-version }}
24+
- name: Set up Python ${{ env.LINT_PYTHON_VERSION }}
2325
uses: actions/setup-python@v3
2426
with:
25-
python-version: 3.11
27+
python-version: ${{ env.LINT_PYTHON_VERSION }}
2628
cache: "poetry"
2729

2830
- name: Install dependencies
@@ -48,10 +50,8 @@ jobs:
4850
fetch-depth: 1
4951

5052
- name: Install Poetry
51-
run: pipx install poetry
52-
53-
- name: Set Poetry config
5453
run: |
54+
pipx install poetry
5555
poetry config virtualenvs.path ~/.virtualenvs${{ matrix.python-version }}
5656
5757
- name: Set up Python ${{ matrix.python-version }}
@@ -61,9 +61,12 @@ jobs:
6161
cache: "poetry"
6262

6363
- name: Install dependencies
64-
run: poetry install -E minify
64+
run: |
65+
poetry env use ${{ matrix.python-version }}
66+
poetry add django==${{ matrix.django-version }}
67+
poetry install -E minify
6568
66-
- name: Fast tests
69+
- name: Fast tests
6770
run: poetry run pytest -m 'not slow'
6871

6972
- name: Slow tests

0 commit comments

Comments
 (0)