Skip to content

Commit

Permalink
Use the Codecov GitHub Action (#497)
Browse files Browse the repository at this point in the history
* Use the Codecov GitHub Action.

* Try single quotes.

* Limit scope of Codecov token.
  • Loading branch information
trexfeathers authored Oct 4, 2024
1 parent f28d78e commit 589eac5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
run:
shell: bash -l {0}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CYTHON_COVERAGE: 1
ENV_NAME: "ci-tests"
strategy:
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
3 changes: 0 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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:}

0 comments on commit 589eac5

Please sign in to comment.