Commit 7e55bf0c authored by Aurélien Delobelle's avatar Aurélien Delobelle
Browse files

core -- Add code coverage to CI

Showing with 22 additions and 1 deletion
+22 -1
......@@ -10,6 +10,7 @@ venv/
media/
*.log
*.sqlite3
.coverage
# PyCharm
.idea
......
......@@ -36,9 +36,12 @@ before_script:
# Remove the old test database if it has not been done yet
- psql --username=$POSTGRES_USER --host=$DBHOST -c "DROP DATABASE IF EXISTS test_$POSTGRES_DB"
- pip install --upgrade --cache-dir vendor/pip -t vendor/python -r requirements.txt
- pip install coverage
- python --version
test:
stage: test
script:
- python manage.py test
- coverage run manage.py test
- coverage report
coverage: '/TOTAL.*\s(\d+\.\d+)\%$/'
# GestioCOF
![build_status](https://git.eleves.ens.fr/cof-geek/gestioCOF/badges/master/build.svg)
[![coverage report](https://git.eleves.ens.fr/cof-geek/gestioCOF/badges/master/coverage.svg)](https://git.eleves.ens.fr/cof-geek/gestioCOF/commits/master)
## Installation
......
setup.cfg 0 → 100644
[coverage:run]
source =
bda
cof
gestioncof
kfet
shared
utils
omit =
*migrations*
*test*.py
branch = true
[coverage:report]
precision = 2
show_missing = true
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment