Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 60 additions & 4 deletions .github/workflows/python-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
id-token: write

jobs:
lint-test:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down Expand Up @@ -45,21 +45,77 @@ 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 to Codecov
- 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

codecov:
runs-on: ubuntu-latest
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
with:
name: coverage-py3.14
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR title indicates that coverage from Python 3.12 should be uploaded to Codecov, but this downloads coverage from Python 3.14 instead. This should be changed to "coverage-py3.12" to match the PR's stated intent.

Suggested change
name: coverage-py3.14
name: coverage-py3.12

Copilot uses AI. Check for mistakes.
path: coverage
Comment on lines +100 to +105
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The codecov job uses "if: always()" which means it will run even if the test job fails. However, the download-artifact step uses "if: !cancelled()" which may cause issues if the test job fails and no artifact is produced. Consider adding a check to ensure the artifact exists before attempting to download, or adjust the condition to handle cases where tests fail for Python 3.12.

Copilot uses AI. Check for mistakes.

- 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() }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
report_type: test_results
use_oidc: true
files: coverage/junit.xml