codecov io test coverage (#21)

This commit is contained in:
Jesse Bannon 2022-05-06 22:49:55 -07:00 committed by GitHub
parent ab2df88299
commit b9ba5ab901
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -28,4 +28,8 @@ jobs:
./tools/linter check
- name: Run tests with coverage
run: |
./tools/test
./tools/test xml
- name: Upload code coverage to codecov.io
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml

View file

@ -1,7 +1,9 @@
# Run within root directory
if [[ $1 = "html" ]]; then
coverage run -m pytest && coverage html
coverage run -m pytest && coverage report && coverage html
elif [[ $1 = "xml" ]]; then
coverage run -m pytest && coverage report && coverage xml
elif [[ $1 = "unit" ]]; then
coverage run -m pytest tests/unit && coverage report
else