Commit e44094ca authored by Raphaël Hertzog's avatar Raphaël Hertzog

gitlab-ci: more fixes related to PostgreSQL

* start postgresql since it's not auto-started
* install python3-psycopg2
parent 7a0e0ded
......@@ -6,7 +6,7 @@ before_script:
- apt-get -y install python3-django/stretch-backports
- apt-get -y install python3-requests python3-django-jsonfield python3-django-captcha python3-debian python3-debianbts python3-apt python3-yaml python3-bs4 python3-pyinotify python3-gpg python3-django-debug-toolbar
# Test dependencies
- apt-get -y install python3-coverage python3-selenium chromium-driver xvfb python3-pip postgresql postgresql-client
- apt-get -y install python3-coverage python3-selenium chromium-driver xvfb python3-pip postgresql postgresql-client python3-psycopg2
# Dependencies to build docs
- apt-get -y install make python3-sphinx
......@@ -19,12 +19,14 @@ flake8:
unit-tests:
script:
- service postgresql start || true
- su - postgres -c "createuser -d root"
- python3 -m coverage erase
- python3 -m coverage run -p ./manage.py test django_email_accounts distro_tracker
- USE_PG=1 python3 -m coverage run -p ./manage.py test django_email_accounts distro_tracker
- python3 -m coverage combine
- python3 -m coverage report | sed -e 's/^TOTAL /TOTAL COVERAGE/'
- service postgresql stop || true
coverage: '/TOTAL COVERAGE.* (\d+(?:\.\d+)?%)/'
artifacts:
paths:
......
Markdown is supported
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