Skip to content

feat: Add coverage reporting#295

Open
hhvrc wants to merge 6 commits intodevelopfrom
feat/add-coverage-reporting
Open

feat: Add coverage reporting#295
hhvrc wants to merge 6 commits intodevelopfrom
feat/add-coverage-reporting

Conversation

@hhvrc
Copy link
Copy Markdown
Contributor

@hhvrc hhvrc commented Apr 28, 2026

No description provided.

@hhvrc hhvrc self-assigned this Apr 28, 2026
Copilot AI review requested due to automatic review settings April 28, 2026 13:47
Copy link
Copy Markdown
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

Adds automated test coverage reporting to CI and publishes a coverage report (and badge) to GitHub Pages.

Changes:

  • Add a coverage badge link to the README.
  • Split CI tests into unit/integration jobs, generate/merge Cobertura coverage, enforce a minimum coverage threshold, and publish the report to GitHub Pages on master.
  • Increase integration test timeout to 5 minutes to reduce CI flakiness.

Reviewed changes

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

File Description
README.md Adds a GitHub Pages coverage badge/link.
API.IntegrationTests/AssemblyAttributes.cs Extends integration test timeout to 5 minutes.
.github/workflows/ci-build.yml Adds coverage generation/enforcement and Pages publishing; restructures test jobs and job dependencies.

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

Comment thread .github/workflows/ci-build.yml Outdated
build:
name: Build (${{ matrix.image }})
runs-on: ubuntu-latest
needs: [coverage]
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

build now needs: [coverage], but the coverage job only runs for PRs / workflow_* / develop / master. For push events on other branches (the workflow is configured to run on push to **), coverage will be skipped and build will be skipped as well, which is likely unintended regression in CI feedback. Consider either (a) removing the build -> coverage dependency, or (b) expanding coverage (and its prerequisites) to run on the same event/branch set as build so builds still execute on branch pushes.

Suggested change
needs: [coverage]

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci-build.yml Outdated
name: Coverage
runs-on: ubuntu-latest
needs: [unit-tests, integration-tests]
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.ref_name == 'develop' || github.ref_name == 'master' }}
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

coverage declares needs: [unit-tests, integration-tests], but integration-tests is conditionally skipped via its job-level if. When that happens, coverage will also be skipped (and anything depending on it), even though unit test coverage artifacts may exist. If integration tests are optional for some events/branches, make the dependency optional by removing integration-tests from needs and handling “no integration report found” in the merge step, or ensure integration-tests always runs (e.g., keep the job but no-op the test step) on events where you still want coverage/build to proceed.

Suggested change
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.ref_name == 'develop' || github.ref_name == 'master' }}
if: ${{ always() && needs.unit-tests.result == 'success' && (needs.integration-tests.result == 'success' || needs.integration-tests.result == 'skipped') && (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.ref_name == 'develop' || github.ref_name == 'master') }}

Copilot uses AI. Check for mistakes.
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.

2 participants