From eb801db2716dc9a016edf22bc01026324f360fc2 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Fri, 17 May 2024 09:19:03 -0400 Subject: [PATCH] build: Add tox rules and update ci matrix. Tox did not have the other python versions so we couldn't test locally with those easily. Also, we don't need to run the `docs`, `quality` and `pii_check` on all versions. Running it on the latest version is sufficient. --- .github/workflows/ci.yml | 15 +++++++++++++-- tox.ini | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ddeacb0..f8d4d585 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,9 +14,20 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04] + os: [ 'ubuntu-20.04' ] python-version: ['3.8', '3.11', '3.12'] - toxenv: [quality, docs, pii_check, django42] + toxenv: [ 'django42' ] + # Only run these other workflows on the latest python version we support. + include: + - python-version: '3.12' + toxenv: 'quality' + os: 'ubuntu-20.04' + - python-version: '3.12' + toxenv: 'docs' + os: 'ubuntu-20.04' + - python-version: '3.12' + toxenv: 'pii_check' + os: 'ubuntu-20.04' steps: - uses: actions/checkout@v4 diff --git a/tox.ini b/tox.ini index 73d3ff43..40d90f26 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{38}-django{42}, quality, docs, pii_check +envlist = py{38,311,312}-django{42}, quality, docs, pii_check [doc8] ignore = D001