Generate coverage reports for the tests

This commit is contained in:
Roland Geider
2020-10-29 17:41:18 +01:00
parent 7fc6e2bbbe
commit 5a3c8bf93f
2 changed files with 13 additions and 3 deletions

2
.coveragerc Normal file
View File

@@ -0,0 +1,2 @@
[run]
omit = *migrations*

View File

@@ -41,16 +41,24 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install wheel coverage
pip install -r requirements_prod.txt
python setup.py develop
- name: Test the application (Postgres)
run: |
wger create-settings --database-type postgresql
python3 manage.py test
coverage run --source='.' python manage.py test
coverage html --directory coverage-postgres
# - name: Test the application (Sqlite)
# run: |
# wger create-settings
# python3 manage.py test
# coverage run --source='.' python manage.py test
# coverage html --directory coverage-sqlite
- name: Save coverage result artifacts
uses: actions/upload-artifact@v2
with:
name: coverage-results-${{ matrix.python-version }}
path: coverage-postgres/