From 628ad5307fa59c8f03d454727e22900228efc66a Mon Sep 17 00:00:00 2001 From: Hans Spaans <1072510+hspaans@users.noreply.github.com> Date: Thu, 3 Sep 2026 23:01:08 +0000 Subject: [PATCH 1/3] Redesign CI pipeline to utilize tox environments for linting and fixing code base --- .github/workflows/ci.yml | 55 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15ae0cb..310fd26 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,9 +13,58 @@ permissions: contents: read jobs: - tox: - name: Test on Python ${{ matrix.py }} + tox-lint: + name: Linting Code Base + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v7 + + - name: Setup python for lint environment + uses: actions/setup-python@v7 + + - name: Install tox-gh + run: | + python -m pip install --upgrade pip + python -m pip install tox-gh + + - name: Setup test suite + run: tox r -vv --notest + + - name: Run test suite + run: tox r --env lint --skip-pkg-install + env: + PYTEST_ADDOPTS: "-vv --durations=10" + + tox-fix: + name: Fixing Code Base + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v7 + + - name: Setup python for fix environment + uses: actions/setup-python@v7 + + - name: Install tox-gh + run: | + python -m pip install --upgrade pip + python -m pip install tox-gh + + - name: Setup test suite + run: tox r -vv --notest + + - name: Run test suite + run: tox r --env fix --skip-pkg-install + env: + PYTEST_ADDOPTS: "-vv --durations=10" + + tox-testing: + name: Testing Code Base on Python ${{ matrix.py }} runs-on: ubuntu-latest + needs: + - tox-lint + - tox-fix strategy: fail-fast: false matrix: @@ -41,7 +90,7 @@ jobs: run: tox r -vv --notest - name: Run test suite - run: tox r --skip-pkg-install + run: tox r --env ${{ matrix.py }} --skip-pkg-install env: PYTEST_ADDOPTS: "-vv --durations=10" From fcd20fa17224dc2e28be4c891664d993f7288652 Mon Sep 17 00:00:00 2001 From: Hans Spaans <1072510+hspaans@users.noreply.github.com> Date: Thu, 3 Sep 2026 23:07:27 +0000 Subject: [PATCH 2/3] Fix syntax for tox environment specification in CI pipeline --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 310fd26..ed9420a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: run: tox r -vv --notest - name: Run test suite - run: tox r --env lint --skip-pkg-install + run: tox r -e lint --skip-pkg-install env: PYTEST_ADDOPTS: "-vv --durations=10" @@ -55,7 +55,7 @@ jobs: run: tox r -vv --notest - name: Run test suite - run: tox r --env fix --skip-pkg-install + run: tox r -e fix --skip-pkg-install env: PYTEST_ADDOPTS: "-vv --durations=10" @@ -90,7 +90,7 @@ jobs: run: tox r -vv --notest - name: Run test suite - run: tox r --env ${{ matrix.py }} --skip-pkg-install + run: tox r -e ${{ matrix.py }} --skip-pkg-install env: PYTEST_ADDOPTS: "-vv --durations=10" From 83f3cdee5697fd41043c577b61b35d3bd85dc2c4 Mon Sep 17 00:00:00 2001 From: Hans Spaans <1072510+hspaans@users.noreply.github.com> Date: Thu, 3 Sep 2026 23:14:46 +0000 Subject: [PATCH 3/3] Refactor CI pipeline to rename linting and fixing suite steps for clarity --- .github/workflows/ci.yml | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed9420a..93f6103 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: - name: Setup test suite run: tox r -vv --notest - - name: Run test suite + - name: Run linting suite run: tox r -e lint --skip-pkg-install env: PYTEST_ADDOPTS: "-vv --durations=10" @@ -54,7 +54,7 @@ jobs: - name: Setup test suite run: tox r -vv --notest - - name: Run test suite + - name: Run fixing suite run: tox r -e fix --skip-pkg-install env: PYTEST_ADDOPTS: "-vv --durations=10" @@ -93,27 +93,3 @@ jobs: run: tox r -e ${{ matrix.py }} --skip-pkg-install env: PYTEST_ADDOPTS: "-vv --durations=10" - - lint: - name: Linting Code Base - runs-on: ubuntu-latest - - steps: - - name: Checkout Code - uses: actions/checkout@v7 - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install flake8 flake8-bugbear flake8-docstrings flake8-github-annotations yamllint - - - name: Lint with yamllint - run: | - yamllint . --format github - - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --format github - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --format github