Skip to content

Add Coveralls coverage reporting to CI #755

@bencap

Description

@bencap

Summary

Integrate Coveralls into the GitHub Actions CI pipeline to track test coverage over time and surface coverage changes on pull requests.

Motivation

MaveDB currently has no automated coverage reporting. Adding Coveralls will:

  • Make coverage regressions visible on PRs before merge
  • Track coverage trends alongside ongoing development
  • Provide a coverage badge for the repo

Implementation

  • Add pytest-cov and coveralls to dev dependencies
  • Update the CI test step to run with coverage output:
  - name: Run tests
    run: pytest --cov=mavedb --cov-report=lcov --cov-report=term-missing
  • Add a Coveralls upload step after tests pass:
  - name: Upload coverage to Coveralls
    uses: coverallsapp/github-action@v2
    with:
      github-token: ${{ secrets.GITHUB_TOKEN }}
      path-to-lcov: coverage.lcov
  • Connect the repo to coveralls.io
  • Add Coveralls badge to README.md

Notes

  • Use lcov format — coverallsapp/github-action@v2 prefers it over XML
  • Coverage can be scoped with --cov=src/mavedb to exclude test files and migrations from the report
  • No additional configuration file needed for a standard layout

References

Metadata

Metadata

Assignees

Labels

app: backendTask implementation touches the backendtype: maintenanceMaintaining this project

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions