Skip to content

Commit

Permalink
Setup reports and upload codecov
Browse files Browse the repository at this point in the history
Create coverage.xml, upload it to GitHub CI and visualize with codecov.

Setup instruction:
- Install codecov for project
  https://github.com/settings/installations/55029514
- Add CODECOV_TOKEN in the GitHub CI project secrets

Related #1097
  • Loading branch information
MattHag authored and pfps committed Oct 8, 2024
1 parent 454e160 commit b1b9f01
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ jobs:
run: |
make test
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
directory: ./coverage/reports/
env_vars: OS, PYTHON
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
token: ${{ secrets.CODECOV_TOKEN }}

macos-tests:
runs-on: macos-latest

Expand All @@ -55,4 +65,13 @@ jobs:
make install_pip PIP_ARGS='.["test"]'
- name: Run tests on macOS
run: |
export DYLD_LIBRARY_PATH=$(brew --prefix hidapi)/lib:$DYLD_LIBRARY_PATH && pytest --cov
export DYLD_LIBRARY_PATH=$(brew --prefix hidapi)/lib:$DYLD_LIBRARY_PATH && pytest --cov --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
directory: ./coverage/reports/
env_vars: OS, PYTHON
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ lint:

test:
@echo "Running Solaar tests"
pytest --cov
pytest --cov --cov-report=xml

0 comments on commit b1b9f01

Please sign in to comment.