Skip to content

Conversation

@DefinitelyADev
Copy link
Owner

Add pytest-cov to requirements-dev.txt and enable coverage reporting in run_tests.py by including --cov and --cov- report=xml options. This provides insight into code coverage, helping to identify areas lacking test coverage.


This pull request enhances the project's test coverage reporting by integrating the pytest-cov plugin and updating the CI workflow to upload coverage reports only for Python 3.12. The main changes focus on generating and uploading code coverage data as part of the testing process.

Test coverage integration:

  • Added pytest-cov to requirements-dev.txt to enable coverage measurement during test runs.
  • Updated run_tests.py to include coverage arguments (--cov and --cov-report=xml) when running tests, generating a coverage report in XML format.

CI workflow update:

  • Modified .github/workflows/ci.yml to upload coverage to Codecov only for Python 3.12 (instead of 3.11), aligning coverage uploads with the latest supported Python version.

@DefinitelyADev DefinitelyADev added this to the 1.2.2 milestone Sep 21, 2025
@DefinitelyADev DefinitelyADev force-pushed the fix/coverage-is-not-uploaded branch 3 times, most recently from c37f301 to b290877 Compare September 21, 2025 23:16
@github-actions github-actions bot added the github_actions Pull requests that update GitHub Actions code label Sep 21, 2025
@DefinitelyADev DefinitelyADev force-pushed the fix/coverage-is-not-uploaded branch from b290877 to 8fce3af Compare September 21, 2025 23:28
@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label Sep 21, 2025
@codecov
Copy link

codecov bot commented Sep 21, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

Copy link
Contributor

Copilot AI left a comment

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 adds code coverage reporting capabilities to the project by integrating pytest-cov and updating the CI workflow to generate and upload coverage reports.

  • Adds pytest-cov dependency for coverage measurement during test execution
  • Updates test runner to generate XML coverage reports with branch coverage
  • Modifies CI workflow to upload coverage reports for Python 3.12 instead of 3.11

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
requirements-dev.txt Adds pytest-cov dependency for coverage reporting
run_tests.py Adds coverage arguments to pytest command for XML report generation
.github/workflows/ci.yml Updates Python version for coverage upload and adds Codecov token

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@DefinitelyADev DefinitelyADev force-pushed the fix/coverage-is-not-uploaded branch 2 times, most recently from 4b04fcd to 0919340 Compare September 21, 2025 23:38
Add `pytest-cov` to `requirements-dev.txt` and enable coverage
reporting in `run_tests.py` by including `--cov` and `--cov-
report=xml` options. This provides insight into code coverage,
helping to identify areas lacking test coverage.
@DefinitelyADev DefinitelyADev force-pushed the fix/coverage-is-not-uploaded branch from 0919340 to b968681 Compare September 21, 2025 23:43
Add details for version 1.2.2 including new GitHub Actions labeler config
and coverage reporting to pytest.
@DefinitelyADev DefinitelyADev merged commit a8d0f51 into master Sep 21, 2025
16 checks passed
@DefinitelyADev DefinitelyADev deleted the fix/coverage-is-not-uploaded branch September 21, 2025 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants