Skip to content

Commit

Permalink
build: add codecov coverage and test result uploading
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-sentry committed Jan 23, 2024
1 parent 5f17817 commit 03df7e5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,18 @@ jobs:
pip install maturin
pip install -r tests/requirements.txt
maturin develop
- name: Install codecov cli
run: |
pip install --no-cache-dir git+https://github.com/codecov/codecov-cli.git@joseph/test-results
- name: Run tests
run: |
. venv/bin/activate
python -m pytest
python -m pytest --cov-report=xml:coverage.xml --junitxml=unit.junit.xml
- name: Upload results to codecov
if: success() || failure()
run:
codecovcli -u ${{ secrets.CODECOV_URL }} create-commit -t ${{ secrets.CODECOV_ORG_TOKEN }}
codecovcli -u ${{ secrets.CODECOV_URL }} create-report -t ${{ secrets.CODECOV_ORG_TOKEN }}
codecovcli -u ${{ secrets.CODECOV_URL }} --verbose do-upload -t ${{ secrets.CODECOV_ORG_TOKEN }} --report-type test_results --flag unit --file unit.junit.xml --disable-search --plugin None
codecovcli -u ${{ secrets.CODECOV_URL }} --verbose do-upload -t ${{ secrets.CODECOV_ORG_TOKEN }} --file coverage.xml

0 comments on commit 03df7e5

Please sign in to comment.