From aecb3870b354c77cb3b186b3bee0b8960c964460 Mon Sep 17 00:00:00 2001 From: Peter Van Dyken Date: Thu, 9 May 2024 14:59:53 -0400 Subject: [PATCH] Move upload_coverate to seperate workflow The hope is that this will give us access to the CODECOV_TOKEN secret so that we don't hit the rate limit --- .github/workflows/test.yml | 15 --------------- .github/workflows/upload_coverage.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/upload_coverage.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d0300ccf..8ed04d74 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -95,21 +95,6 @@ jobs: name: coverage-${{ matrix.python-version }}-${{ matrix.split }} path: ./coverage.xml - upload_coverage: - runs-on: ubuntu-latest - needs: [ 'test' ] - steps: - - name: checkout repository - uses: actions/checkout@v4 - - name: download coverage reports - uses: actions/download-artifact@v4 - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4 - with: - verbose: true - fail_ci_if_error: true - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} deployment_on_base: diff --git a/.github/workflows/upload_coverage.yml b/.github/workflows/upload_coverage.yml new file mode 100644 index 00000000..4a0224bb --- /dev/null +++ b/.github/workflows/upload_coverage.yml @@ -0,0 +1,26 @@ + +on: + workflow_run: + workflows: [Test workflow] + types: + - completed + +jobs: + upload_coverage: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} + steps: + - name: checkout repository + uses: actions/checkout@v4 + - name: download coverage reports + uses: actions/download-artifact@v4 + with: + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4 + with: + verbose: true + fail_ci_if_error: true + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}