Skip to content

Commit

Permalink
Fix coverage report generation in test.yml Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed Aug 14, 2024
1 parent 5f14fd5 commit bc3c287
Showing 1 changed file with 16 additions and 30 deletions.
46 changes: 16 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,14 @@ jobs:
run: python -m pip install -U -r .github/workflows/requirements.txt
- name: Build extension
run: python setup.py build_ext --inplace --debug
- name: Test extension without coverage
run: python -m unittest discover -vv
- name: Test extension with coverage
run: python -m coverage run -m unittest discover -vv
- name: Export coverage reports
run: python -m coverage xml
- name: Upload coverage statistics
uses: codecov/codecov-action@v1
with:
flags: Linux,${{ matrix.python-impl}},${{ matrix.python-release }}

test_macos:
name: Test (MacOS)
Expand Down Expand Up @@ -98,8 +104,14 @@ jobs:
run: python -m pip install -U -r .github/workflows/requirements.txt
- name: Build extension
run: python setup.py build_ext --inplace --debug
- name: Test extension without coverage
run: python -m unittest discover -vv
- name: Test extension with coverage
run: python -m coverage run -m unittest discover -vv
- name: Export coverage reports
run: python -m coverage xml
- name: Upload coverage statistics
uses: codecov/codecov-action@v1
with:
flags: MacOS,${{ matrix.python-impl}},${{ matrix.python-release }}

# test_win32:
# name: Test (Windows)
Expand Down Expand Up @@ -149,29 +161,3 @@ jobs:
# uses: codecov/codecov-action@v1
# with:
# flags: Windows,${{ matrix.python-impl}},${{ matrix.python-release }}

coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v1
with:
submodules: recursive
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Setup Rust nightly
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: Measure code coverage
uses: actions-rs/tarpaulin@v0.1
with:
version: '0.16.0'
args: '-v --out Xml --ciserver github-actions'
- name: Upload coverage statistics
uses: codecov/codecov-action@v1

0 comments on commit bc3c287

Please sign in to comment.