Skip to content

Commit

Permalink
build: roll-up junit and coverage to repo (#5935)
Browse files Browse the repository at this point in the history
* build: add nyc to root pjson

* fix: enable extension repo level coverage reports

@W-16640098@

* chore: wip

* chore: bump artifact action to v4

---------

Co-authored-by: Cristina Cañizales <[email protected]>
  • Loading branch information
peternhale and CristiCanizales authored Nov 8, 2024
1 parent 676ca52 commit fa7ee19
Show file tree
Hide file tree
Showing 7 changed files with 570 additions and 465 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/unitTestsLinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,11 @@ jobs:
- run: npm ci
- run: npm run compile
- run: npm run test:unit
- run: npm run capture:results
# Archive test results and coverage reports
- name: Archive test results and coverage reports
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: test-results
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,4 @@ tsconfig.tsbuildinfo

#Extensions folder for local E2E Testing
extensions/
/test-results
2 changes: 1 addition & 1 deletion config/jest.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
'default',
['jest-junit', { outputName: 'junit-custom-unitTests.xml' }]
],
coverageReporters: ['lcov', 'text'],
coverageReporters: ['lcov', 'text', 'json'],
resetMocks: true
// This collectCoverageFrom will show coverage for all files in a projects, but slows down calculating coverage results.
// Can be a good tool for measuring coverage of the project as a whole locally, but shouldn't be committed at this time.
Expand Down
7 changes: 2 additions & 5 deletions config/jest.integration.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ module.exports = {
testEnvironment: 'node',
testMatch: ['**/integration/**/?(*.)+(spec|test).[t]s?(x)'],
setupFilesAfterEnv: ['../../scripts/setup-jest.ts'],
reporters: [
'default',
['jest-junit', { outputName: 'junit-custom-integrationTests.xml' }]
],
coverageReporters: ['lcov', 'text'],
reporters: ['default', ['jest-junit', { outputName: 'junit-custom-integrationTests.xml' }]],
coverageReporters: ['lcov', 'text', 'json'],
resetMocks: true
};
Loading

0 comments on commit fa7ee19

Please sign in to comment.