File tree 1 file changed +17
-4
lines changed
1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change 23
23
24
24
steps :
25
25
- name : Checkout
26
- uses : actions/checkout@v2
26
+ uses : actions/checkout@v4
27
27
28
28
- uses : arduino/cpp-test-action@main
29
29
with :
@@ -36,10 +36,23 @@ jobs:
36
36
- '/usr/*'
37
37
coverage-data-path : ${{ env.COVERAGE_DATA_PATH }}
38
38
39
+ # A token is used to avoid intermittent spurious job failures caused by rate limiting.
40
+ - name : Set up Codecov upload token
41
+ run : |
42
+ if [[ "${{ github.repository }}" == "arduino-libraries/Arduino_CloudUtils" ]]; then
43
+ # In order to avoid uploads of data from forks, only use the token for runs in the parent repo.
44
+ # Token is intentionally exposed.
45
+ # See: https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954
46
+ CODECOV_TOKEN="8118de48-b2af-48b4-a66a-26026847bfc5"
47
+ else
48
+ # codecov/codecov-action does unauthenticated upload if empty string is passed via the `token` input.
49
+ CODECOV_TOKEN=""
50
+ fi
51
+ echo "CODECOV_TOKEN=$CODECOV_TOKEN" >> "$GITHUB_ENV"
52
+
39
53
- name : Upload coverage report to Codecov
40
- uses : codecov/codecov-action@v1
54
+ uses : codecov/codecov-action@v3
41
55
with :
42
56
file : " ${{ env.COVERAGE_DATA_PATH }}"
43
57
fail_ci_if_error : true
44
-
45
-
58
+ token : ${{ env.CODECOV_TOKEN }}
You can’t perform that action at this time.
0 commit comments