Skip to content

Fix coverage workflow install and expand Ubuntu CI test matrix#43

Merged
dancergraham merged 3 commits into
mainfrom
copilot/fix-coverage-job-failure
Jun 10, 2026
Merged

Fix coverage workflow install and expand Ubuntu CI test matrix#43
dancergraham merged 3 commits into
mainfrom
copilot/fix-coverage-job-failure

Conversation

Copilot AI commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

The coverage Actions job was failing before tests started because it invoked maturin develop without an active virtualenv. This change makes the job follow a packaging path that works in CI, adds an Ubuntu-only pytest matrix across all currently supported Python versions, and updates the workflow actions to current major versions while preserving the existing wheel-matrix jobs.

  • Root cause

    • maturin develop --release --extras test requires a virtualenv or conda environment.
    • The new coverage job ran it directly in the runner environment, so the job exited during setup.
  • Workflow changes

    • Add a dedicated Ubuntu-only pytest job matrix for Python 3.10, 3.11, 3.12, 3.13, and 3.14.
    • Keep the dedicated coverage job on Linux/Python 3.12.
    • Replace the maturin develop step with an editable install:
      • python -m pip install -e .[test]
    • Generate HTML, Markdown, and XML coverage reports with line-level detail.
    • Upload all three reports together as the coverage-reports artifact.
  • GitHub Actions updates

    • Update actions/checkout to v6.
    • Update actions/setup-python to v6.
    • Update actions/upload-artifact to v7.
    • Update actions/download-artifact to v8.
    • Update actions/attest-build-provenance to v4.
    • Update uraimo/run-on-arch-action to v3.
  • Dependency updates

    • Add pytest-cov to the test optional dependency group in pyproject.toml.
    • This keeps the coverage job aligned with the repo's existing test extras instead of introducing a separate install path.
  • Resulting CI path

    pytest:
      runs-on: ubuntu-latest
      strategy:
        matrix:
          python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
    
    coverage:
      runs-on: ubuntu-latest
      steps:
        - uses: actions/checkout@v6
        - uses: actions/setup-python@v6
          with:
            python-version: "3.12"
    
        - name: Install package and test dependencies
          run: python -m pip install -e .[test]
    
        - name: Run coverage
          run: pytest --cov=e57 --cov-report=term-missing --cov-report=xml --cov-report=html
    
        - name: Generate markdown coverage report
          run: python -m coverage report --format=markdown > coverage.md
    
        - name: Upload coverage artifacts
          uses: actions/upload-artifact@v7
          with:
            name: coverage-reports
            path: |
              coverage.xml
              coverage.md
              htmlcov/

Copilot AI changed the title Fix failing coverage GitHub Actions job Fix coverage workflow to install the package without maturin develop Jun 10, 2026
Copilot AI requested a review from dancergraham June 10, 2026 14:01
@dancergraham

Copy link
Copy Markdown
Owner

@copilot the uploaded coverage report is really minimal and unhelpful (see below)- I would like html and markdown reports as well with line coverage so I can see which lines hit and which miss.

Copilot AI commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

@copilot the uploaded coverage report is really minimal and unhelpful (see below)- I would like html and markdown reports as well with line coverage so I can see which lines hit and ...

Done in the latest commit. The coverage job now generates three report formats:

  • --cov-report=htmlhtmlcov/ directory (browsable per-file line coverage)
  • python -m coverage report --format=markdown > coverage.mdcoverage.md (Markdown table with Stmts/Miss/Cover columns)
  • --cov-report=xmlcoverage.xml (kept for tooling compatibility)

All three are bundled in the coverage-reports artifact uploaded at the end of the job.

@dancergraham

Copy link
Copy Markdown
Owner

@copilot update the coverage step first add a pytest matrix of all currently supported python versions - 3.10 to 3.14 on ubunto only, update the coverage step to use py 3.12, update the github actions to the latest versions

Copilot AI commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

@copilot update the coverage step first add a pytest matrix of all currently supported python versions - 3.10 to 3.14 on ubunto only, update the coverage step to use py 3.12, update the github...

Addressed in 6601028. The workflow now adds an Ubuntu-only pytest matrix for Python 3.10-3.14, keeps coverage on Python 3.12, and updates the GitHub Actions versions to their latest major releases.

Copilot AI changed the title Fix coverage workflow to install the package without maturin develop Fix coverage workflow install and expand Ubuntu CI test matrix Jun 10, 2026
@dancergraham dancergraham marked this pull request as ready for review June 10, 2026 18:23
Copilot AI review requested due to automatic review settings June 10, 2026 18:23
@dancergraham dancergraham merged commit 6634b00 into main Jun 10, 2026
17 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the project’s CI to fix the failing coverage job (previously using maturin develop without an active venv), adds a dedicated Ubuntu-only pytest matrix across supported Python versions, and modernizes several GitHub Actions used in the workflow while keeping the existing wheel build/test jobs.

Changes:

  • Add pytest-cov to the test optional dependency group.
  • Introduce a new Ubuntu-only pytest job matrix for Python 3.10–3.14 and a dedicated Ubuntu coverage job (Python 3.12) that installs via pip install -e .[test] and uploads coverage artifacts.
  • Update multiple GitHub Actions to newer major versions across existing jobs (checkout/setup-python/artifact actions/attestation, etc.).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
pyproject.toml Adds coverage tooling to test extras (but needs a version constraint adjustment for pytest 9 compatibility).
.github/workflows/CI.yml Fixes coverage job install path, adds Ubuntu pytest matrix, and updates Actions versions while preserving wheel-matrix jobs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyproject.toml
Comment on lines 27 to 30
test = [
'pytest>=9,<10',
'pytest-cov>=5,<7',
]
@dancergraham dancergraham deleted the copilot/fix-coverage-job-failure branch June 11, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants