Skip to content

Commit

Permalink
Add code coverage reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
mika-robots committed Sep 15, 2023
1 parent ae5889e commit 8658387
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/cypress_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
path: packages/api/logs

- name: set code coverage badge
run: npx -p check-code-coverage update-badge --from '${GITHUB_WORKSPACE}/packages/webapp/coverage/coverage-summary.json'
run: npx -p check-code-coverage update-badge --from '${GITHUB_WORKSPACE}/packages/end-to-end/coverage/coverage-summary.json'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

Expand Down
8 changes: 8 additions & 0 deletions packages/end-to-end/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,13 @@ module.exports = defineConfig({
e2e: {
baseUrl: 'http://localhost:3000',
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
setupNodeEvents(on, config) {
require('@cypress/code-coverage/task')(on, config);
// include any other plugin code...

// It's IMPORTANT to return the config object
// with any changed environment variables
return config;
},
},
});
1 change: 1 addition & 0 deletions packages/end-to-end/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"author": "",
"license": "GPL-3.0",
"devDependencies": {
"@cypress/code-coverage": "^3.12.1",
"cypress": "^13.0.0",
"cypress-react-selector": "^3.0.0",
"cypress-terminal-report": "^5.3.2",
Expand Down

0 comments on commit 8658387

Please sign in to comment.