ojuso-map/.gitlab-ci.yml

47 lines
1005 B
YAML

---
image: joyzoursky/python-chromedriver:3.6
stages:
- test
services:
- mdillon/postgis:9.6-alpine
variables:
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
DEBUG: 1
POSTGRES_DB: ojusomap
POSTGRES_USER: ojusomap
POSTGRES_PASSWORD: passw0rd
DATABASE_HOST: mdillon__postgis
DATABASE_NAME: $POSTGRES_DB
DATABASE_USER: $POSTGRES_USER
DATABASE_PASSWORD: $POSTGRES_PASSWORD
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
paths:
- .cache/pip
before_script:
- apt-get update && cat system-requirements-debian.txt | xargs apt-get install -y
- python -V
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
- pip install -U pip setuptools
- pip install -r requirements/devel.txt
- python manage.py collectstatic
pytest:
stage: test
script:
- pytest -v --cov=ojusomap --cov=apps