Skip to content

Commit

Permalink
ci(test): fix coverage file (#1147)
Browse files Browse the repository at this point in the history
Используем обычный json для покрытия, вместо junit
  • Loading branch information
SevereCloud authored Dec 26, 2024
1 parent ed80609 commit 3d65d2e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
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

0 comments on commit 3d65d2e

Please sign in to comment.