Try to speed up CI
This commit is contained in:
parent
3b79d377ef
commit
11e8270185
@ -9,6 +9,10 @@ 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
|
||||
@ -20,14 +24,24 @@ variables:
|
||||
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
|
||||
|
||||
pytest:
|
||||
stage: test
|
||||
before_script:
|
||||
before_script:
|
||||
- apt-get update && cat system-requirements-debian.txt | xargs apt-get install -y
|
||||
- python manage.py collectstatic
|
||||
- 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
|
||||
- apt-get update && cat system-requirements-debian.txt | xargs apt-get install -y
|
||||
- python manage.py collectstatic
|
||||
|
||||
pytest:
|
||||
stage: test
|
||||
script:
|
||||
- pytest -v --cov=ojusomap --cov=apps
|
||||
|
Loading…
Reference in New Issue
Block a user