Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
coverage-github-reporter
Advanced tools
Report Jest/Istanbul coverage statistics from CircleCI to GitHub
Report Jest/Istanbul coverage statistics from CircleCI to GitHub
A GitHub auth token is required to post a comment on github. I recommend creating a separate "bot" GitHub account with access to your repos.
GH_AUTH_TOKEN
with the new tokenFor subsequent projects:
GH_AUTH_TOKEN
toGH_AUTH_TOKEN
and importTo access artifacts for private repos, a CircleCI API token is required.
CIRCLE_CI_API_TOKEN
with the new tokenAdd to your package.json
:
npm install --save-dev coverage-github-reporter
If you're using Jest, I suggest adding a test script along these lines:
"scripts": {
"test-ci": "jest --ci --silent --coverage"
}
This will generate a coverage in coverage/
Update your .circleci/config.yml
:
general:
artifacts:
- "coverage/lcov-report"
jobs:
build:
steps:
# … other steps (npm/yarn install, lint, etc)
- run:
name: Test
command: npm run test-ci
# Store coverage artifacts so they can be browsed and be diffed by other builds
- store_artifacts:
path: coverage
destination: coverage
- run:
name: Post coverage comment to GitHub
command: npx report-coverage
The report-coverage
CLI has some options to customize behavior:
Options:
-b, --branch [value] Base branch to use if not PR (defaults to "master")
-j, --coverage-json [value] Relative path to istanbul coverage JSON (defaults to "coverage/coverage-final.json")
-r, --coverage-root [value] Relative path to coverage html root (for artifact links) (defaults to "coverage/lcov-report")
-h, --help Output usage information
-v, --version Output the version number
[1.1.0] - UNRELEASED
FAQs
Report Jest/Istanbul coverage statistics from CircleCI to GitHub
The npm package coverage-github-reporter receives a total of 1,604 weekly downloads. As such, coverage-github-reporter popularity was classified as popular.
We found that coverage-github-reporter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.