@@ -245,10 +245,10 @@ jobs:
245245 node-version :
246246 - 24
247247 env :
248+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
248249 COVERAGE_SUMMARY : ./coverage/coverage-summary.json
249250 NODE_NO_WARNINGS : 1
250251 PCT : .total.branches.pct + .total.functions.pct + .total.lines.pct + .total.statements.pct
251- VITEST_REPORT : ./.vitest-reports/test.blob.json
252252 steps :
253253 - id : checkout
254254 name : Checkout ${{ env.REF_NAME }}
@@ -272,58 +272,57 @@ jobs:
272272 path : ${{ env.CACHE_PATH }}
273273 - id : test
274274 name : Run tests
275- run : |
276- yarn test:cov --coverage.thresholds.100=false \
277- && echo "coverage=$(jq '${{ env.PCT }}' ${{ env.COVERAGE_SUMMARY }} -r)" >>$GITHUB_OUTPUT
275+ run : yarn test:cov --coverage.thresholds.100=false
276+ - id : coverage
277+ name : Get coverage points
278+ uses : flex-development/jq-action@1.0.0
279+ with :
280+ data : ${{ env.COVERAGE_SUMMARY }}
281+ filter : " '${{ env.PCT }}'"
278282 - id : pct
279283 name : Print coverage points
280- run : echo ${{ steps.test .outputs.coverage }}
284+ run : echo ${{ steps.coverage .outputs.result }}
281285 - id : report
282286 name : Upload report
283287 uses : actions/upload-artifact@v4.6.2
284288 with :
285- name : ${{ format('test-node {0}- {1}.blob.json', matrix.node-version, env.SHA ) }}
286- path : ${{ env.VITEST_REPORT }}
289+ name : ${{ format('{0}. {1}.blob.json', env.SHA, matrix.node-version) }}
290+ path : ./.vitest-reports/test.blob.json
287291 - id : coverage-summary
288292 name : Upload coverage summary
289293 uses : actions/upload-artifact@v4.6.2
290294 with :
291- name : ${{ format('coverage-node {0}- {1}.json', matrix.node-version, env.SHA ) }}
295+ name : ${{ format('{0}. {1}.coverage. json', env.SHA, matrix.node-version) }}
292296 path : ${{ env.COVERAGE_SUMMARY }}
293- - id : codecov-coverage
294- name : Upload coverage report to Codecov
295- uses : codecov/codecov-action@v5.5.1
296- with :
297- env_vars : GITHUB_JOB,GITHUB_REF_TYPE
298- fail_ci_if_error : true
299- files : ./coverage/lcov.info
300- flags : ${{ format('node{0}', matrix.node-version) }}
301- name : ${{ format('node{0}-{1}', matrix.node-version, env.SHA) }}
302- override_branch : ${{ env.REF }}
303- override_build : ${{ github.run_id }}
304- override_commit : ${{ env.SHA }}
305- token : ${{ secrets.CODECOV_TOKEN }}
306- verbose : true
307- working-directory : ${{ github.workspace }}
308297 - id : codecov-results
309298 if : ${{ !cancelled() }}
310299 name : Upload test results to Codecov
311300 uses : codecov/test-results-action@v1.1.1
312301 with :
302+ disable_search : true
313303 env_vars : GITHUB_JOB,GITHUB_REF_TYPE
314304 fail_ci_if_error : true
315305 files : ./__tests__/reports/junit.xml
316306 flags : ${{ format('node{0}', matrix.node-version) }}
317- name : ${{ format('node{0}-{1}', matrix.node-version, env.SHA) }}
318- override_branch : ${{ env.REF }}
319- override_build : ${{ github.run_id }}
320- override_commit : ${{ env.SHA }}
321- token : ${{ secrets.CODECOV_TOKEN }}
307+ name : ${{ format('{0}.node{1}', env.SHA, matrix.node-version) }}
308+ override_branch : ${{ env.REF_NAME }}
309+ verbose : true
310+ - id : codecov-coverage
311+ name : Upload coverage report to Codecov
312+ uses : codecov/codecov-action@v5.5.1
313+ with :
314+ disable_file_fixes : true
315+ disable_search : true
316+ env_vars : GITHUB_JOB,GITHUB_REF_TYPE
317+ fail_ci_if_error : true
318+ files : ./coverage/lcov.info
319+ flags : ${{ format('node{0}', matrix.node-version) }}
320+ name : ${{ format('{0}.node{1}', env.SHA, matrix.node-version) }}
321+ override_branch : ${{ env.REF_NAME }}
322322 verbose : true
323- working-directory : ${{ github.workspace }}
324323 - id : coverage-failure
325- if : steps.test .outputs.coverage != ' 400'
326- name : Coverage threshold failure (${{ steps.test .outputs.coverage }})
324+ if : fromJson( steps.coverage .outputs.result) != 400
325+ name : Coverage threshold failure (${{ steps.coverage .outputs.result }})
327326 run : yarn test:cov:reports
328327 artifacts :
329328 needs :
@@ -362,7 +361,7 @@ jobs:
362361 path : ${{ env.CACHE_PATH }}
363362 - id : local-binaries
364363 name : Add local binaries to $PATH
365- run : echo "$GITHUB_WORKSPACE/$CACHE_PATH /.bin" >> $GITHUB_PATH
364+ run : echo "$GITHUB_WORKSPACE/node_modules /.bin" >> $GITHUB_PATH
366365 - id : changelog
367366 name : Changelog preview
368367 env :
0 commit comments