Skip to content

PR sync trigger + coverage config#379

Merged
jonmattgray merged 68 commits into
mainfrom
feat/coverage
Nov 10, 2025
Merged

PR sync trigger + coverage config#379
jonmattgray merged 68 commits into
mainfrom
feat/coverage

Conversation

@jonmattgray
Copy link
Copy Markdown
Contributor

@jonmattgray jonmattgray commented Oct 30, 2025

Pull Request

Checklist

  • Have you read Digital Catapult's Code of Conduct?
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

PR Type

  • Chore

Linked tickets

https://digicatapult.atlassian.net/browse/NIDT-188

High level description

Trigger npm tests on GitHub PR sync/open/reopen rather than on push. NOTE - Only triggers if PR has no merge conflicts with the base branch.
Set c8 config for this repo

Detailed description

Describe alternatives you've considered

Operational impact

Additional context

@jonmattgray jonmattgray changed the title test comment Code coverage Oct 30, 2025
Comment thread .github/workflows/test.yaml Fixed
@jonmattgray jonmattgray marked this pull request as ready for review October 30, 2025 17:30
@jonmattgray jonmattgray requested a review from a team as a code owner October 30, 2025 17:30
Copilot AI review requested due to automatic review settings October 30, 2025 17:30
@jonmattgray jonmattgray marked this pull request as draft October 30, 2025 17:30
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

This PR adds code coverage reporting to the project using c8 (a native V8 code coverage tool). The implementation includes integration with GitHub Actions to automatically report coverage metrics on pull requests.

  • Adds c8 package for code coverage collection
  • Configures coverage reporting for unit and rate limit tests
  • Adds a GitHub Actions workflow job to generate and report coverage metrics on PRs

Reviewed Changes

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

Show a summary per file
File Description
package.json Adds c8 as a dev dependency and wraps unit/ratelimit test commands with c8 for coverage collection; adds new coverage:report script
package-lock.json Installs c8 v10.1.3 and its dependencies including istanbul tooling
.gitignore Excludes the coverage/ directory from version control
.github/workflows/test.yaml Adds a new coverage job that runs tests with coverage and reports results to PRs using zgosalvez/github-actions-report-lcov action; updates quote styles to double quotes for consistency
.c8rc.json Configures c8 to include TypeScript source files, exclude test directories and generated routes, and output lcov format reports

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

Comment thread .github/workflows/test.yaml Outdated
Comment thread .c8rc.json
Comment thread package.json Outdated
@digicatapult digicatapult deleted a comment from github-actions Bot Nov 3, 2025
@jonmattgray jonmattgray changed the title Code coverage Coverage config Nov 7, 2025
@jonmattgray jonmattgray marked this pull request as ready for review November 7, 2025 14:10
@jonmattgray jonmattgray changed the title Coverage config PR sync trigger + coverage config Nov 7, 2025
@jonmattgray jonmattgray merged commit 469cdb9 into main Nov 10, 2025
20 checks passed
@jonmattgray jonmattgray deleted the feat/coverage branch November 10, 2025 09:55
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.

4 participants