Skip to content

Commit

Permalink
NAS-132650 / 25.04 / Fixing codecov coverage reporting (#11114)
Browse files Browse the repository at this point in the history
  • Loading branch information
undsoft authored Nov 29, 2024
1 parent db3ec81 commit fcf669d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,28 +90,26 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- name: Collect coverage from shards
- name: Checkout
uses: actions/checkout@v4
- name: Collect coverage and test data from shards
uses: actions/download-artifact@v4
with:
pattern: 'coverage-*'
path: coverage
merge-multiple: true
- name: Collect test data from shards
uses: actions/download-artifact@v4
with:
pattern: 'junit-*'
path: coverage
merge-multiple: true
- name: Merge Code Coverage
run: npx -y nyc merge coverage/ coverage/merged-coverage.json
- name: Merge Test Data
run: npx -y junit-report-merger coverage/merged-junit.xml "coverage/junit-*.xml"
- name: Remove shard data
run: rm -rf coverage/coverage-*.json coverage/junit-*.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
name: webui
token: ${{ env.CODECOV_TOKEN }}
file: coverage/merged-coverage.json
files: coverage/merged-coverage.json
fail_ci_if_error: true
- name: Upload extra test data to Codecov
if: ${{ !cancelled() }}
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"strict-null-checks": "node_modules/typescript/bin/tsc --project tsconfig.strictNullChecks.json",
"test": "jest",
"test:changed": "node scripts/test_changed.js",
"test:ci": "jest --runInBand",
"test:pr": "yarn run check-env && echo 'Setting up temporary environment file...\\n' && yarn run ui remote -i 'headless.local' && jest --coverage --maxWorkers=2",
"test:watch": "jest --watch",
"ui": "cd $(git rev-parse --show-toplevel) && tsx ./scripts/ui/ui.ts",
Expand Down

0 comments on commit fcf669d

Please sign in to comment.