Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add coverage workflow to GitHub Actions #154

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

Pennycook
Copy link
Contributor

This action performs a coverage analysis for any source files that have been modified, and reports if there are any new or modified lines that are not covered by any tests.

The coverage analysis is focused on new code because we know there are paths that are currently not covered; the intent of this new action is only to prevent a pull request from making the situation worse.

Related issues

Closes #47. 🎉

Proposed changes

  • Add a new GitHub action to check coverage.
  • Add check-coverage.py to:
    • Read a coverage.json file;
    • Parse the git blame information for each missing line; and
    • Report any lines where blame points to a commit SHA that was passed to the script via its --commits argument.
  • Add coverage.yml to:
    • Run coverage;
    • Generate coverage.json for only the files that were modified by the PR; and
    • Run check-coverage.py on coverage.json.

This action performs a coverage analysis for any source files that have been
modified, and reports if there are any new or modified lines that are not
covered by any tests.

The coverage analysis is focused on new code because we know there are paths
that are currently not covered; the intent of this new action is only to
prevent a pull request from making the situation worse.

Signed-off-by: John Pennycook <[email protected]>
@Pennycook Pennycook requested a review from laserkelvin January 21, 2025 14:24
@Pennycook Pennycook added the ci/cd GitHub Actions, pre-commit hooks, etc label Jan 21, 2025
@Pennycook Pennycook merged commit d9f6a56 into intel:main Jan 22, 2025
2 checks passed
@Pennycook Pennycook deleted the coverage-action branch January 22, 2025 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/cd GitHub Actions, pre-commit hooks, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI pipeline is incomplete
2 participants