Skip to content

Commit

Permalink
Use pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
elnappo committed Mar 6, 2019
1 parent 79ca349 commit 474bc82
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ test:
script:
- setup_test_db
- /code/docker-entrypoint.sh test
artifacts:
reports:
junit: report.xml
only:
- branches
except:
Expand Down
2 changes: 1 addition & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ case "$1" in
exec python manage.py shell
;;
test)
exec python manage.py test
exec pytest
;;
migrate)
echo "Apply database migrations"
Expand Down
6 changes: 6 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[pytest]
DJANGO_SETTINGS_MODULE = settings
# -- recommended but optional:
python_files = tests.py test_*.py *_tests.py
junit_family = xunit2
addopts = --reuse-db --cov-report term --cov=project_novis --junitxml=report.xml
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ gunicorn[gevent]
psycopg2
pylint
PyPDF2
pytest
pytest-cov
pytest-django
python-dateutil
raven
rope
Expand Down

0 comments on commit 474bc82

Please sign in to comment.