Skip to content

Commit

Permalink
Collect coverage only in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
matejchalk committed Oct 17, 2024
1 parent 99367da commit e74c67b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 4 additions & 1 deletion code-pushup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ const config = {
patterns: ['src/**/*.js']
}),
await coveragePlugin({
coverageToolCommand: { command: 'npm', args: ['test'] },
coverageToolCommand: {
command: 'npm',
args: ['run', 'ci-test']
},
reports: ['coverage/lcov.info']
}),
await jsPackagesPlugin({ packageManager: 'npm' })
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"scripts": {
"bundle": "npm run format:write && npm run package",
"ci-test": "NODE_OPTIONS=--experimental-vm-modules npx jest",
"ci-test": "NODE_OPTIONS=--experimental-vm-modules npx jest --coverage",
"coverage": "npx make-coverage-badge --output-path ./badges/coverage.svg",
"format:write": "npx prettier --write .",
"format:check": "npx prettier --check .",
Expand Down Expand Up @@ -71,7 +71,6 @@
"text",
"lcov"
],
"collectCoverage": true,
"collectCoverageFrom": [
"./src/**"
]
Expand Down

0 comments on commit e74c67b

Please sign in to comment.