From 09e0ff3017f05c05f725405a176184bd305d6033 Mon Sep 17 00:00:00 2001 From: Mario Apra Date: Fri, 12 Jul 2024 14:46:18 +0100 Subject: [PATCH] Bump version of github actions - actions/setup-go: Bumping it to v5. With the v5, cache is done by default, so there is no need to specify cache: true - actions/checkout: bumping it to v4 A lot of different improvements, but the one that made me decide to upgrade was to use node20 instead of node16. Node16 has en end of life on 11 Sep 2023 - codecov/codecov-action: bumping it to v4 (v4.5.0) It was hard-coded v4.2.0, meaning that the fixes around detecting if running from a fork (v4.3, v4.4 and v.4.5) were not backported, therefore making the job not being able to detect when it was running from a fork --- .github/workflows/juno-test.yml | 15 +++++++------- .github/workflows/upload-codecov.yml | 29 ---------------------------- 2 files changed, 7 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/upload-codecov.yml diff --git a/.github/workflows/juno-test.yml b/.github/workflows/juno-test.yml index 5acf5ab0d3..0e374ca68f 100644 --- a/.github/workflows/juno-test.yml +++ b/.github/workflows/juno-test.yml @@ -19,12 +19,11 @@ jobs: env: VM_DEBUG: true steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up go - uses: actions/setup-go@v4.1.0 + uses: actions/setup-go@v5 with: go-version-file: go.mod - cache: true - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 with: @@ -50,10 +49,10 @@ jobs: - name: Benchmark run: make benchmarks - - uses: actions/upload-artifact@v4 + - name: Upload coverage to Codecov if: matrix.os == 'ubuntu-latest' + uses: codecov/codecov-action@v4 with: - name: code_coverage - path: ./coverage/coverage.out - if-no-files-found: error - retention-days: 1 + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true + files: coverage.out diff --git a/.github/workflows/upload-codecov.yml b/.github/workflows/upload-codecov.yml deleted file mode 100644 index 77960e2a67..0000000000 --- a/.github/workflows/upload-codecov.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Upload Codecov - - -on: - workflow_run: - workflows: ["Juno Test"] - types: - - completed - -jobs: - upload: - runs-on: ubuntu-latest - if: github.event.workflow_run.conclusion == 'success' - steps: - - name: Download artifact - uses: dawidd6/action-download-artifact@v6 - with: - workflow: ${{ github.event.workflow_run.name }} - run_id: ${{ github.event.workflow_run.id }} - name: code_coverage - github_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4.2.0 - with: - token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: true - files: coverage.out - verbose: true