Skip to content

Commit 0b6ac3b

Browse files
authored
Merge pull request #40 from arduino/codecov-token
Added codecov token in cleartext
2 parents 183e63e + 1365dce commit 0b6ac3b

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/test-go-task.yml

+15-3
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,22 @@ jobs:
9393
run: task go:test
9494

9595
- name: Send unit tests coverage to Codecov
96-
if: runner.os == 'Linux'
96+
if: runner.os == 'Linux' && github.repository == 'arduino/pluggable-discovery-protocol-handler'
9797
uses: codecov/codecov-action@v3
9898
with:
99+
# A token is used to avoid intermittent spurious job failures caused by rate limiting.
100+
token: d2497f03-291d-4e0c-9d31-d94614ed7c16
99101
file: ${{ matrix.module.path }}coverage_unit.txt
100102
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

0 commit comments

Comments
 (0)