.gitlab-ci.yml 1.1 KB
Newer Older
Wietse Kuipers's avatar
Wietse Kuipers committed
1 2 3 4 5 6
variables:
  POSTGRES_DB: thalia
  POSTGRES_USER: postgres
  POSTGRES_PASSWORD: ""
  CI_DEPS: psycopg2

Thom Wiggers's avatar
Thom Wiggers committed
7
pep8:
Thom Wiggers's avatar
Thom Wiggers committed
8
  image: python:3.5
Thom Wiggers's avatar
Thom Wiggers committed
9 10 11 12 13 14 15
  before_script:
    - export PIP_CACHE_DIR="pip-cache"
    - pip install tox
  script:
    - tox -e flake8

.djangotest: &djangotest
Thom Wiggers's avatar
Thom Wiggers committed
16 17
  services:
    - postgres:latest
Thom Wiggers's avatar
Thom Wiggers committed
18 19 20 21
  before_script:
    - export PIP_CACHE_DIR="pip-cache"
    - mkdir -p pip-cache
    - git log -1
Thom Wiggers's avatar
Thom Wiggers committed
22
    - pip install tox coverage
23 24
    - apt-get update
    - apt-get install -y ghostscript  # required for Thabloid's tests
Thom Wiggers's avatar
Thom Wiggers committed
25
  script:
Thom Wiggers's avatar
Thom Wiggers committed
26
    - tox -e ${PYTHON_VERSION}-${DJANGO_VERSION}
Thom Wiggers's avatar
Thom Wiggers committed
27 28
    - cd website
    - coverage report
Thom Wiggers's avatar
Thom Wiggers committed
29

Thom Wiggers's avatar
Thom Wiggers committed
30
python35-django11:
Thom Wiggers's avatar
Thom Wiggers committed
31 32 33 34
  <<: *djangotest
  image: python:3.5
  variables:
    PYTHON_VERSION: py35
Thom Wiggers's avatar
Thom Wiggers committed
35 36
    DJANGO_VERSION: django11

Thom Wiggers's avatar
Thom Wiggers committed
37 38 39 40 41 42 43 44 45
docs:
  image: python:3.5
  before_script:
    # install django deps
    - pip install -r requirements.txt
    - cd docs
    # install doc deps
    - pip install -r requirements.txt
  script:
Thom Wiggers's avatar
Thom Wiggers committed
46
    - env -u GITLAB_CI make doctest
Thom Wiggers's avatar
Thom Wiggers committed
47 48
    - test -z "$(env -u GITLAB_CI make html | egrep -w 'SEVERE:|ERROR:')"

Thom Wiggers's avatar
Thom Wiggers committed
49
cache:
Thom Wiggers's avatar
Thom Wiggers committed
50
  key: "$CI_BUILD_NAME"
Thom Wiggers's avatar
Thom Wiggers committed
51 52 53 54
  paths:
    - pip-cache

# vim: set sw=2 ts=2 et :