diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index f8ac9424..df7d54e2 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -26,7 +26,6 @@ jobs: run: shell: bash -l {0} env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} CYTHON_COVERAGE: 1 ENV_NAME: "ci-tests" strategy: @@ -40,7 +39,6 @@ jobs: - os: ubuntu-latest version: py312 posargs: "--cov-report=xml --cov" - post-command: codecov - os: macos-latest version: py312 platform: osx @@ -109,10 +107,14 @@ jobs: key: ${{ runner.os }}-tox-${{ env.ENV_NAME }}-${{ matrix.version }}-p${{ env.CACHE_PERIOD }}-b${{ env.CACHE_BUILD }}-${{ hashFiles(env.TOX_INI) }} - name: "Run ${{ matrix.os }} on ${{ matrix.version}} tests" - env: - POST_COMMAND: ${{ matrix.post-command }} run: | export PATH=${{ matrix.gitpath-prepend }}$PATH which git git --version tox -e ${{ matrix.version }}-${{ matrix.platform }}-test -- ${{ matrix.posargs }} + + - name: "Upload coverage report to Codecov" + if: contains(matrix.posargs, '--cov') + uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/tox.ini b/tox.ini index 8a94fba7..9d7e6cd6 100644 --- a/tox.ini +++ b/tox.ini @@ -46,11 +46,8 @@ conda_spec = description = Perform cf-units unit/integration tests. passenv = - CODECOV_TOKEN CYTHON_COVERAGE - POST_COMMAND usedevelop = true commands = pytest {posargs} - {env:POST_COMMAND:}