Skip to content

Test PRs for unit test coverage regression#210

Merged
JanCBrammer merged 5 commits intodevfrom
ci-coverage
May 4, 2026
Merged

Test PRs for unit test coverage regression#210
JanCBrammer merged 5 commits intodevfrom
ci-coverage

Conversation

@JanCBrammer
Copy link
Copy Markdown
Collaborator

@JanCBrammer JanCBrammer commented Apr 23, 2026

This PR addresses #203.

For every PR against the dev branch the workflow .github/workflows/test_coverage_regression.yml compares the PR's unit test coverage with the coverage of the dev branch (https://iupac-inchi.github.io/InChI/coverage/summary.txt). The latter is computed on every push to dev (see .github/workflows/deploy_pages.yml). The .github/workflows/test_coverage_regression.yml workflow fails every PR who's coverage falls below the dev coverage.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 23, 2026

Unit Test Coverage Report

Coverage Regression Summary

Metric PR (%) Base (%) Difference (pp)
Lines 18.1 18.1 +0.00
Branches 11.8 11.8 +0.00

Find details on the base coverage at https://iupac-inchi.github.io/InChI/coverage/index.html

Find details on this PR's coverage by downloading coverage-reports-25304520901 and opening html/index.html

Copy link
Copy Markdown

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

Adds a CI workflow to compute C unit test coverage on pull requests and publish the results back to the PR and build artifacts.

Changes:

  • Install lcov as part of the build dependencies.
  • Add a new GitHub Actions workflow that builds with coverage flags, runs unit tests, generates an HTML coverage report, uploads it as an artifact, and posts a sticky PR comment/job summary.

Reviewed changes

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

File Description
INCHI-1-TEST/install_build_dependencies.sh Adds lcov to the dependency install script so coverage tooling is available in CI/devcontainer flows.
.github/workflows/compute_unit_test_coverage.yml New PR workflow to build with coverage enabled, generate/upload coverage reports, and post results to the PR.

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

Comment thread .github/workflows/compute_unit_test_coverage.yml Outdated
Comment thread .github/workflows/compute_unit_test_coverage.yml Outdated
Comment thread .github/workflows/compute_unit_test_coverage.yml Outdated
Comment thread .github/workflows/compute_unit_test_coverage.yml Outdated
Comment thread .github/workflows/compute_unit_test_coverage.yml Outdated
@JanCBrammer JanCBrammer removed the request for review from cm-beilstein April 23, 2026 11:29
@JanCBrammer JanCBrammer force-pushed the dev branch 2 times, most recently from c43dd48 to 4a81ee7 Compare April 28, 2026 12:29
@JanCBrammer JanCBrammer changed the title Post unit test coverage to PRs Test PRs for unit test coverage regression Apr 28, 2026
@JanCBrammer JanCBrammer requested a review from Copilot April 28, 2026 12:46
Copy link
Copy Markdown

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.


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

Comment thread .github/workflows/test_coverage_regression.yml Outdated
Comment thread .github/workflows/test_coverage_regression.yml
Comment thread .github/workflows/test_coverage_regression.yml Outdated
Comment thread .github/workflows/test_coverage_regression.yml
@JanCBrammer JanCBrammer force-pushed the ci-coverage branch 3 times, most recently from b4a7439 to 05c602e Compare April 29, 2026 06:42
@JanCBrammer JanCBrammer linked an issue Apr 29, 2026 that may be closed by this pull request
@JanCBrammer JanCBrammer merged commit 182f49a into dev May 4, 2026
3 checks passed
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.

Add unit test coverage on CI

2 participants