Skip to content

Commit

Permalink
build: use correct toxenv for quality checks in the CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Agrendalath committed Apr 25, 2024
1 parent b235602 commit e5fc5a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,19 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04]
toxenv: [py38-django42, py311-django42, py312-django42, py38-quality, py311-quality, py312-quality, translations]
python-version: [3.8, 3.11, 3.12]
toxenv: [django42, quality, translations]

steps:
- name: checkout repo
uses: actions/checkout@v3
with:
submodules: recursive

- name: Extract the Python version from tox environment
run: |
if [[ "${{ matrix.toxenv }}" =~ py[0-9]+ ]]; then
PYTHON_VERSION=$(echo "${{ matrix.toxenv }}" | sed -E 's/py([0-9])([0-9]+).*/\1.\2/')
else
# Default version
PYTHON_VERSION=3.8
fi
echo "PYTHON_VERSION=$PYTHON_VERSION" >> $GITHUB_ENV
- name: setup python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version: ${{ matrix.python-version }}

- name: Install translations dependencies
if: ${{ startsWith(matrix.toxenv, 'translations') }}
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{38,311,312}-django{42},py{38,311,312}-quality,translations
envlist = py{38,311,312}-django{42},quality,translations

[pycodestyle]
exclude = .git,.tox
Expand Down

0 comments on commit e5fc5a0

Please sign in to comment.