From f4ec01bace6612be7fd71bb7e18e92b68aaf4d17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Fri, 15 Nov 2024 10:35:00 +0100 Subject: [PATCH] [chore] Fix codecov action usage (#5979) This change makes sure that an unsuccessful upload will fail the workflow as this does not happen at the moment. See: https://github.com/open-telemetry/opentelemetry-go/actions/runs/11845773487/job/33011997881?pr=5978#step:3:175 Additionally, it configures the codecov action to be tokenless. Related issue (most likely solved): - https://github.com/open-telemetry/community/issues/2440 From https://github.com/codecov/codecov-action?tab=readme-ov-file#migration-guide: > The v5 release also coincides with the opt-out feature for tokens for public repositories. In the repository settings page in codecov.io, you can set the ability for Codecov to receive a coverage report from ANY souce. This will allow contributors or other members of a repository to upload without needing access to the Codecov token. More https://github.com/codecov/codecov-action/issues/1645 v4 was still working. See: https://github.com/open-telemetry/opentelemetry-go/actions/runs/11842872629/job/33002565858#step:3:11 We might also consider reverting to v4 of the codecov action and just setting `fail_ci_if_error: true`. --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a01aa4fa349..b6e43ae1ffe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -123,9 +123,8 @@ jobs: pattern: coverage-artifacts-${{ env.DEFAULT_GO_VERSION }} - name: Upload coverage report uses: codecov/codecov-action@v5.0.0 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: + fail_ci_if_error: true files: ./coverage.txt verbose: true