From f8d712a563c02e6f3a37702b9f0896fb5f5ef061 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Wed, 24 Apr 2024 09:41:30 +1200 Subject: [PATCH] ci: upgrade Codecov to v4 --- .github/workflows/checks.yml | 2 ++ .github/workflows/prerelease-check.yml | 2 ++ .github/workflows/test-action/action.yml | 10 +++++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 55bf93119e..f93aa8e710 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -109,3 +109,5 @@ jobs: check-latest: true - name: Run test action uses: ./.github/workflows/test-action + with: + codecov_token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/prerelease-check.yml b/.github/workflows/prerelease-check.yml index 3b587daa3d..0c3d7b6d26 100644 --- a/.github/workflows/prerelease-check.yml +++ b/.github/workflows/prerelease-check.yml @@ -102,6 +102,8 @@ jobs: check-latest: true - name: Run test action uses: ./.github/workflows/test-action + with: + codecov_token: ${{ secrets.CODECOV_TOKEN }} release-helper: permissions: contents: read # to fetch code (actions/checkout) diff --git a/.github/workflows/test-action/action.yml b/.github/workflows/test-action/action.yml index c25b24609d..b8165c7dac 100644 --- a/.github/workflows/test-action/action.yml +++ b/.github/workflows/test-action/action.yml @@ -15,6 +15,11 @@ name: test description: "Runs go tests" +inputs: + codecov_token: + description: "Token for uploading coverage reports to Codecov" + required: true + runs: using: composite steps: @@ -24,4 +29,7 @@ runs: TEST_ACCEPTANCE: true run: ./scripts/run_tests.sh - name: Upload coverage to Codecov - uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3.1.6 + uses: codecov/codecov-action@84508663e988701840491b86de86b666e8a86bed # v4.3.0 + with: + token: ${{ inputs.CODECOV_TOKEN }} + fail_ci_if_error: true