Commit c564c1f1 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Merge branch 'faster-build' into 'master'

Speed up CI

See merge request !641
parents fff51f83 bd35ec5f
...@@ -3,12 +3,18 @@ variables: ...@@ -3,12 +3,18 @@ variables:
POSTGRES_USER: postgres POSTGRES_USER: postgres
POSTGRES_PASSWORD: "" POSTGRES_PASSWORD: ""
CI_DEPS: psycopg2 CI_DEPS: psycopg2
# https://hub.docker.com/r/twiggers/python-thalia/
# https://github.com/thomwiggers/python-thalia
# Should get auto-updated with the official 'python' repository
# Installs:
# - pip: tox, coverage
# - apt: ghostscript
PY35_IMAGE: twiggers/python-thalia:3.5
PIP_CACHE_DIR: "${CI_PROJECT_DIR}/pip-cache"
pep8: pep8:
image: python:3.5 image: $PY35_IMAGE
before_script: before_script:
- export PIP_CACHE_DIR="pip-cache"
- pip install tox
script: script:
- tox -e flake8 - tox -e flake8
...@@ -16,12 +22,7 @@ pep8: ...@@ -16,12 +22,7 @@ pep8:
services: services:
- postgres:latest - postgres:latest
before_script: before_script:
- export PIP_CACHE_DIR="pip-cache"
- mkdir -p pip-cache
- git log -1 - git log -1
- pip install tox coverage
- apt-get update
- apt-get install -y ghostscript # required for Thabloid's tests
script: script:
- tox -e ${PYTHON_VERSION}-${DJANGO_VERSION} - tox -e ${PYTHON_VERSION}-${DJANGO_VERSION}
- cd website - cd website
...@@ -29,13 +30,13 @@ pep8: ...@@ -29,13 +30,13 @@ pep8:
python35-django11: python35-django11:
<<: *djangotest <<: *djangotest
image: python:3.5 image: $PY35_IMAGE
variables: variables:
PYTHON_VERSION: py35 PYTHON_VERSION: py35
DJANGO_VERSION: django11 DJANGO_VERSION: django11
docs: docs:
image: python:3.5 image: $PY35_IMAGE
before_script: before_script:
# install django deps # install django deps
- pip install -r requirements.txt - pip install -r requirements.txt
...@@ -49,6 +50,6 @@ docs: ...@@ -49,6 +50,6 @@ docs:
cache: cache:
key: "$CI_JOB_NAME" key: "$CI_JOB_NAME"
paths: paths:
- pip-cache - "${PIP_CACHE_DIR}"
# vim: set sw=2 ts=2 et : # vim: set sw=2 ts=2 et :
...@@ -22,7 +22,9 @@ deps = ...@@ -22,7 +22,9 @@ deps =
django11: django>=1.11b1,<1.12 django11: django>=1.11b1,<1.12
{env:CI_DEPS:} {env:CI_DEPS:}
passenv = GITLAB_CI passenv =
GITLAB_CI
PIP_CACHE_DIR
whitelist_externals= whitelist_externals=
sed sed
cp cp
...@@ -35,3 +37,5 @@ deps= flake8 ...@@ -35,3 +37,5 @@ deps= flake8
skip_install=True skip_install=True
commands= commands=
flake8 . flake8 .
passenv =
PIP_CACHE_DIR
Supports Markdown
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