Skip to content

Commit

Permalink
Bump codecov/codecov-action from 3 to 4 (#831)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
dependabot[bot] and umbynos authored Mar 22, 2024
1 parent 35cb0e6 commit 8885398
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/test-go-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,26 @@ jobs:
GO_MODULE_PATH: ${{ matrix.module.path }}
run: task go:test

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

0 comments on commit 8885398

Please sign in to comment.