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

services:
  - postgres:latest

Thom Wiggers's avatar
Thom Wiggers committed
10 11 12 13 14 15 16 17 18 19 20 21 22
pep8:
  image: python:3.4
  before_script:
    - export PIP_CACHE_DIR="pip-cache"
    - pip install tox
  script:
    - tox -e flake8

.djangotest: &djangotest
  before_script:
    - export PIP_CACHE_DIR="pip-cache"
    - mkdir -p pip-cache
    - git log -1
Thom Wiggers's avatar
Thom Wiggers committed
23
    - pip install tox coverage
Thom Wiggers's avatar
Thom Wiggers committed
24 25
  script:
    - tox -e $PYTHON_VERSION
Thom Wiggers's avatar
Thom Wiggers committed
26 27
    - cd website
    - coverage report
Thom Wiggers's avatar
Thom Wiggers committed
28 29 30 31 32 33 34 35 36 37 38 39 40

python34:
  <<: *djangotest
  image: python:3.4
  variables:
    PYTHON_VERSION: py34

python35:
  <<: *djangotest
  image: python:3.5
  variables:
    PYTHON_VERSION: py35

Thom Wiggers's avatar
Thom Wiggers committed
41 42 43 44 45 46 47 48 49 50 51
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:
    - test -z "$(env -u GITLAB_CI make html | egrep -w 'SEVERE:|ERROR:')"

Thom Wiggers's avatar
Thom Wiggers committed
52
cache:
Thom Wiggers's avatar
Thom Wiggers committed
53
  key: "$CI_BUILD_NAME"
Thom Wiggers's avatar
Thom Wiggers committed
54 55 56 57
  paths:
    - pip-cache

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