Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(test): fix coverage file #1147

Merged
merged 1 commit into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/reusable_workflow_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ jobs:
run: yarn run test:ci

- name: Upload test artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: test-output
path: |
junit.xml
test-results.json
.nyc_output/coverage-final.json

deploy_test_coverage:
if: ${{ !cancelled() && (success() || failure()) }}
needs: test
runs-on: ubuntu-latest
permissions:
Expand All @@ -49,5 +52,5 @@ jobs:
uses: codecov/codecov-action@v5
with:
use_oidc: true
files: junit.xml
files: .nyc_output/coverage-final.json
fail_ci_if_error: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ docs/src/**/*.d.ts
docs/public/**/*.json
docs/dist/
!.husky
test-results.json
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"tsc:dist": "tsc --project tsconfig.publish.json",
"tsc:generate-paths": "tscpaths -p tsconfig.tscpaths.json -s ./dist -o ./dist",
"test": "jest --coverage",
"test:ci": "jest --coverage --verbose --reporters=\"jest-junit\" --reporters=\"default\"",
"test:ci": "jest --ci --silent --outputFile test-results.json --json --coverage --coverageReporters='json' --coverageDirectory='.nyc_output'",
"clear:src": "find src -name '*.d.ts' -delete && find src -name '*.js' -delete",
"clear:dist": "find dist -regex '.*[^d]\\.ts' -delete",
"open:coverage": "open .coverage/index.html",
Expand Down
Loading