From 77327dae8735ceeeae88553b2a560e09aba4af36 Mon Sep 17 00:00:00 2001 From: Bradley Reynolds Date: Thu, 15 Jan 2026 01:46:21 +0000 Subject: [PATCH 1/3] CI: run tests in Matrix and upload only 3.12 to Codecov Signed-off-by: Bradley Reynolds --- .github/workflows/python-ci.yaml | 59 +++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-ci.yaml b/.github/workflows/python-ci.yaml index 0c64536..8fa792d 100644 --- a/.github/workflows/python-ci.yaml +++ b/.github/workflows/python-ci.yaml @@ -11,7 +11,7 @@ permissions: id-token: write jobs: - lint-test: + lint: runs-on: ubuntu-latest steps: - name: Checkout repository @@ -45,17 +45,67 @@ jobs: - name: Run mypy run: uv run mypy --strict src/ tests/ - - name: Run tests + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] + steps: + - name: Checkout repository + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + with: + persist-credentials: false + + - name: Install uv + uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0 + with: + enable-cache: true + resolution-strategy: "lowest" + + - name: Setup Python + uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 + with: + python-version: ${{ matrix.python-version }} + + - name: Sync dependencies + run: uv sync --group dev --group tests + + - name: Run tests with coverage run: uv run python -m coverage run -m pytest -v --junitxml=junit.xml - name: Create coverage report - run: uv run coverage xml + run: uv run coverage xml -o coverage.xml + + - name: Upload coverage reports + if: ${{ !cancelled() }} + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 + with: + name: coverage-py${{ matrix.python-version }} + path: | + coverage.xml + junit.xml + if-no-files-found: error - - name: Upload coverage reports to Codecov + codecov: + runs-on: ubuntu-latest + needs: [test] + if: ${{ always() }} + steps: + - name: Download coverage reports + if: ${{ !cancelled() }} + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 + with: + name: coverage-py3.12 + path: coverage + + - name: Upload coverage to Codecov + if: ${{ !cancelled() }} uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 with: report_type: coverage use_oidc: true + files: coverage/coverage.xml - name: Upload test results to Codecov if: ${{ !cancelled() }} @@ -63,3 +113,4 @@ jobs: with: report_type: test_results use_oidc: true + files: coverage/junit.xml From 0e936489e77a9fd94be943b2ebbd56164dc31f3d Mon Sep 17 00:00:00 2001 From: Bradley Reynolds Date: Thu, 15 Jan 2026 01:54:40 +0000 Subject: [PATCH 2/3] Try checking out repo during upload? Signed-off-by: Bradley Reynolds --- .github/workflows/python-ci.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/python-ci.yaml b/.github/workflows/python-ci.yaml index 8fa792d..9894100 100644 --- a/.github/workflows/python-ci.yaml +++ b/.github/workflows/python-ci.yaml @@ -92,6 +92,11 @@ jobs: needs: [test] if: ${{ always() }} steps: + - name: Checkout repository + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + with: + persist-credentials: false + - name: Download coverage reports if: ${{ !cancelled() }} uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 From 63392942e18b61ebb83168682d895fb51720daaa Mon Sep 17 00:00:00 2001 From: Bradley Reynolds Date: Thu, 15 Jan 2026 01:59:42 +0000 Subject: [PATCH 3/3] Codecov: use latest Python for reports Signed-off-by: Bradley Reynolds --- .github/workflows/python-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-ci.yaml b/.github/workflows/python-ci.yaml index 9894100..9bedb68 100644 --- a/.github/workflows/python-ci.yaml +++ b/.github/workflows/python-ci.yaml @@ -101,7 +101,7 @@ jobs: if: ${{ !cancelled() }} uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 with: - name: coverage-py3.12 + name: coverage-py3.14 path: coverage - name: Upload coverage to Codecov