ojuso-map/.gitlab-ci.yml

48 lines
1.0 KiB
YAML
Raw Normal View History

2018-04-08 20:22:31 +00:00
---
2018-09-26 14:21:44 +00:00
image: joyzoursky/python-chromedriver:3.6
2018-04-08 20:22:31 +00:00
stages:
- test
services:
- mdillon/postgis:9.6-alpine
variables:
2019-04-07 17:42:23 +00:00
# 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"
2018-04-08 20:22:31 +00:00
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
2019-04-07 17:42:23 +00:00
# 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/base.txt
- pip install -r requirements/test.txt
2019-04-07 18:10:36 +00:00
- python manage.py collectstatic
2018-04-08 20:22:31 +00:00
pytest:
stage: test
script:
2018-09-23 12:50:38 +00:00
- pytest -v --cov=ojusomap --cov=apps