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

ci: Use codecov-cli for coverage report upload #2260

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
25 changes: 13 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade .[test]
python -m pip install --upgrade codecov-cli

- name: List installed Python packages
run: python -m pip list
Expand All @@ -66,10 +67,10 @@ jobs:
if: >-
github.event_name != 'schedule' &&
matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
flags: unittests-${{ matrix.python-version }}
run: |
codecovcli create-commit
codecovcli create-report
codecovcli do-upload --file ./coverage.xml --flag unittests-${{ matrix.python-version }}

- name: Test Contrib module with pytest
run: |
Expand All @@ -82,10 +83,10 @@ jobs:

- name: Report contrib coverage with Codecov
if: github.event_name != 'schedule' && matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
flags: contrib
run: |
codecovcli create-commit
codecovcli create-report
codecovcli do-upload --file ./coverage.xml --flag contrib

- name: Test docstring examples with doctest
if: matrix.python-version == '3.11'
Expand All @@ -99,10 +100,10 @@ jobs:

- name: Report doctest coverage with Codecov
if: github.event_name != 'schedule' && matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
with:
files: doctest-coverage.xml
flags: doctest
run: |
codecovcli create-commit
codecovcli create-report
codecovcli do-upload --file ./doctest-coverage.xml --flag doctest

- name: Run benchmarks
if: github.event_name == 'schedule' && matrix.python-version == '3.11'
Expand Down