.gitlab-ci.yml 1.23 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
Wietse Kuipers's avatar
Wietse Kuipers committed
13

Thom Wiggers's avatar
Thom Wiggers committed
14
pep8:
15
  image: $PY35_IMAGE
Thom Wiggers's avatar
Thom Wiggers committed
16
17
18
19
20
21
  before_script:
    - export PIP_CACHE_DIR="pip-cache"
  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
27
28
  before_script:
    - export PIP_CACHE_DIR="pip-cache"
    - mkdir -p pip-cache
    - git log -1
  script:
Thom Wiggers's avatar
Thom Wiggers committed
29
    - tox -e ${PYTHON_VERSION}-${DJANGO_VERSION}
Thom Wiggers's avatar
Thom Wiggers committed
30
31
    - cd website
    - coverage report
Thom Wiggers's avatar
Thom Wiggers committed
32

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

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

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

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