File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ name: UploadCoverageReport
88 - master
99 pull_request :
1010
11+ env :
12+ REPORT_PATH : " coverage/coverage-final.json"
13+
1114jobs :
1215 UploadCoverageReport :
1316 runs-on : ubuntu-latest
2528 - name : Generate coverage report
2629 run : npm test -- --coverage
2730
28- - name : Upload coverage to codecov
29- uses : codecov/codecov-action@v3
31+ - name : Upload coverage to codecov (tokenless)
32+ if : github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
33+ uses : codecov/codecov-action@v4
34+ with :
35+ files : " ${{ env.REPORT_PATH }}"
36+ fail_ci_if_error : true
37+
38+ - name : Upload coverage to codecov (with token)
39+ if : " ! github.event.pull_request.head.repo.fork "
40+ uses : codecov/codecov-action@v4
3041 with :
31- files : " coverage/coverage-final.json"
42+ token : ${{ secrets.CODECOV_TOKEN }}
43+ files : " ${{ env.REPORT_PATH }}"
3244 fail_ci_if_error : true
3345...
You can’t perform that action at this time.
0 commit comments