Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the Codecov GitHub Action #497

Merged
merged 3 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:}
Loading