newsreader/.gitlab-ci.yml
2019-07-09 20:33:05 +02:00

25 lines
585 B
YAML

services:
- postgres:9.6
variables:
POSTGRES_DB: newsreader
POSTGRES_USER: newsreader
python tests:
image: python:3.7.4-slim-stretch
stage: test
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- .cache/pip
- env/
before_script:
- python3 -m venv env
- source env/bin/activate
- pip install -r requirements/gitlab.txt
script:
- python src/manage.py test newsreader --settings=newsreader.conf.gitlab
- isort -rc src/ --check-only
- black -l 100 --check src/