File tree 1 file changed +15
-3
lines changed
1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -93,10 +93,22 @@ jobs:
93
93
run : task go:test
94
94
95
95
- name : Send unit tests coverage to Codecov
96
- if : runner.os == 'Linux'
96
+ if : runner.os == 'Linux' && github.repository == 'arduino/pluggable-discovery-protocol-handler'
97
97
uses : codecov/codecov-action@v3
98
98
with :
99
+ # A token is used to avoid intermittent spurious job failures caused by rate limiting.
100
+ token : d2497f03-291d-4e0c-9d31-d94614ed7c16
99
101
file : ${{ matrix.module.path }}coverage_unit.txt
100
102
flags : ${{ matrix.module.codecov-flags }}
101
- token : ${{ secrets.CODECOV_TOKEN }}
102
- fail_ci_if_error : ${{ github.repository == 'arduino/pluggable-discovery-protocol-handler' }}
103
+ fail_ci_if_error : true
104
+
105
+ - name : Send unit tests coverage to Codecov (run from a fork)
106
+ if : runner.os == 'Linux' && github.repository != 'arduino/pluggable-discovery-protocol-handler'
107
+ uses : codecov/codecov-action@v3
108
+ with :
109
+ # use repository variable CODECOV_TOKEN if running from a fork.
110
+ # codecov/codecov-action does unauthenticated upload if empty string is passed via the `token` input.
111
+ token : ${{ vars.CODECOV_TOKEN }}
112
+ file : ${{ matrix.module.path }}coverage_unit.txt
113
+ flags : ${{ matrix.module.codecov-flags }}
114
+ fail_ci_if_error : false
You can’t perform that action at this time.
0 commit comments