This commit is contained in:
jbannon 2022-04-29 07:33:52 +00:00
parent 4c120393cb
commit 2ce413272e
2 changed files with 16 additions and 9 deletions

View file

@ -22,13 +22,12 @@ jobs:
run: |
pip install .[lint]
./tools/linter check
- name: Run tests with coverage
- name: Run tests
run: |
pip install .[test]
./tools/test
- name: Upload test coverage
uses: actions/upload-artifact@v3
./tools/test xml
- name: Report coverage
uses: 5monkeys/cobertura-action@master
with:
name: test-coverage
path: htmlcov/index.html
retention-days: 5
path: coverage.xml
repo_token: ${{ secrets.GITHUB_TOKEN }}

View file

@ -1,2 +1,10 @@
# Run within root folder. Runs tests with coverage, and reports it to html
coverage run -m pytest && coverage html
# Run within root directory
if [ $1 = "html" ]; then
coverage run -m pytest && coverage html
elif [ $1 = "xml" ]; then
coverage run -m pytest && coverage xml
else
coverage run -m pytest && coverage report
fi