
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
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
FAQs
Report Jest/Istanbul coverage statistics from CircleCI to GitHub
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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.