.gitlab-ci.yml 1.18 KB
Newer Older
Wietse Kuipers's avatar
Wietse Kuipers committed
1
2
3
4
5
variables:
  POSTGRES_DB: thalia
  POSTGRES_USER: postgres
  POSTGRES_PASSWORD: ""
  CI_DEPS: psycopg2
6
7
8
9
10
11
12
  # 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
Thom Wiggers's avatar
Thom Wiggers committed
13
  PIP_CACHE_DIR: "${CI_PROJECT_DIR}/pip-cache"
Wietse Kuipers's avatar
Wietse Kuipers committed
14

Thom Wiggers's avatar
Thom Wiggers committed
15
pep8:
16
  image: $PY35_IMAGE
Thom Wiggers's avatar
Thom Wiggers committed
17
18
19
20
21
  before_script:
  script:
    - tox -e flake8

.djangotest: &djangotest
Thom Wiggers's avatar
Thom Wiggers committed
22
23
  services:
    - postgres:latest
Thom Wiggers's avatar
Thom Wiggers committed
24
25
26
  before_script:
    - git log -1
  script:
Thom Wiggers's avatar
Thom Wiggers committed
27
    - tox -e ${PYTHON_VERSION}-${DJANGO_VERSION}
Thom Wiggers's avatar
Thom Wiggers committed
28
29
    - cd website
    - coverage report
Thom Wiggers's avatar
Thom Wiggers committed
30

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

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

Thom Wiggers's avatar
Thom Wiggers committed
50
cache:
51
  key: "$CI_JOB_NAME"
Thom Wiggers's avatar
Thom Wiggers committed
52
  paths:
Thom Wiggers's avatar
Thom Wiggers committed
53
    - "${PIP_CACHE_DIR}"
Thom Wiggers's avatar
Thom Wiggers committed
54
55

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