Skip to content

Commit 8885398

Browse files
Bump codecov/codecov-action from 3 to 4 (#831)
* Bump codecov/codecov-action from 3 to 4 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](codecov/codecov-action@v3...v4) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * expose the token, this is intentional. https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Umberto Baldi <[email protected]>
1 parent 35cb0e6 commit 8885398

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

Diff for: .github/workflows/test-go-task.yml

+17-2
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,26 @@ jobs:
9696
GO_MODULE_PATH: ${{ matrix.module.path }}
9797
run: task go:test
9898

99+
# A token is used to avoid intermittent spurious job failures caused by rate limiting.
100+
- name: Set up Codecov upload token
101+
if: runner.os == 'Linux'
102+
run: |
103+
if [[ "${{ github.repository }}" == "arduino/arduino-create-agent" ]]; then
104+
# In order to avoid uploads of data from forks, only use the token for runs in the arduino/arduino-create-agent repo.
105+
# Token is intentionally exposed.
106+
# See: https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954
107+
CODECOV_TOKEN=fe64847a-368e-4f95-9212-1f7a6835043f
108+
else
109+
# codecov/codecov-action does unauthenticated upload if empty string is passed via the `token` input.
110+
CODECOV_TOKEN=""
111+
fi
112+
echo "CODECOV_TOKEN=$CODECOV_TOKEN" >> "$GITHUB_ENV"
113+
99114
- name: Send unit tests coverage to Codecov
100115
if: runner.os == 'Linux'
101-
uses: codecov/codecov-action@v3
116+
uses: codecov/codecov-action@v4
102117
with:
103-
token: ${{ secrets.CODECOV_TOKEN }}
118+
token: ${{ env.CODECOV_TOKEN }}
104119
files: ${{ matrix.module.path }}coverage_unit.txt
105120
flags: ${{ matrix.module.codecov-flags }}
106121
fail_ci_if_error: ${{ github.repository == 'arduino/arduino-create-agent' }}

0 commit comments

Comments
 (0)