File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change 2323
2424 steps :
2525 - name : Checkout
26- uses : actions/checkout@v2
26+ uses : actions/checkout@v4
2727
2828 - uses : arduino/cpp-test-action@main
2929 with :
@@ -36,10 +36,23 @@ jobs:
3636 - '/usr/*'
3737 coverage-data-path : ${{ env.COVERAGE_DATA_PATH }}
3838
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/ArduinoBLE" ]]; 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+
3953 - name : Upload coverage report to Codecov
40- uses : codecov/codecov-action@v1
54+ uses : codecov/codecov-action@v3
4155 with :
4256 file : " ${{ env.COVERAGE_DATA_PATH }}"
4357 fail_ci_if_error : true
44-
45-
58+ token : ${{ env.CODECOV_TOKEN }}
You can’t perform that action at this time.
0 commit comments