Skip to content

Commit

Permalink
Add lint variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamghill committed Jul 28, 2024
1 parent 3edc887 commit 8498fae
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: Python

on:
push:
workflow_dispatch:

env:
LINT_PYTHON_VERSION: 3.11

jobs:
lint:
runs-on: ubuntu-latest
Expand All @@ -13,16 +17,14 @@ jobs:
fetch-depth: 1

- name: Install Poetry
run: pipx install poetry

- name: Set Poetry config
run: |
poetry config virtualenvs.path ~/.virtualenvs3.11
pipx install poetry
poetry config virtualenvs.path ~/.virtualenvs$LINT_PYTHON_VERSION
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python $LINT_PYTHON_VERSION
uses: actions/setup-python@v3
with:
python-version: 3.11
python-version: $LINT_PYTHON_VERSION
cache: "poetry"

- name: Install dependencies
Expand All @@ -48,10 +50,8 @@ jobs:
fetch-depth: 1

- name: Install Poetry
run: pipx install poetry

- name: Set Poetry config
run: |
pipx install poetry
poetry config virtualenvs.path ~/.virtualenvs${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -61,7 +61,10 @@ jobs:
cache: "poetry"

- name: Install dependencies
run: poetry install -E minify
run: |
poetry env use ${{ matrix.python-version }}
poetry add django==${{ matrix.django-version }}
poetry install -E minify
- name: Fast tests
run: poetry run pytest -m 'not slow'
Expand Down

0 comments on commit 8498fae

Please sign in to comment.