-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
111 lines (98 loc) · 1.97 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
image: python:3.7
stages:
- build
- install
- qa
- test
flake8:
stage: qa
script:
- pip install flake8
- flake8
build:js:
image: node:12-alpine
stage: build
script:
- yarn install --modules-folder ausgsteckt/ausgsteckt/static/node_modules/
artifacts:
paths:
- ausgsteckt/ausgsteckt/static/node_modules/
expire_in: 1 day
.pages:
stage: build
script:
- apt install make
- pip install Sphinx
- cd docs
- make html
build:pages:
extends: .pages
artifacts:
paths:
- docs/_build/html
expire_in: 7 day
except:
- master
pages:
extends: .pages
after_script:
- mv docs/_build/html public
artifacts:
paths:
- public
expire_in: 1 day
only:
- master
.install:
stage: install
variables:
REQUIREMENTS_FILE: "requirements/test.txt"
before_script:
- python -m venv .venv
- source .venv/bin/activate
- pip install -U wheel pip setuptools
script:
- pip wheel --wheel-dir wheels -r ${REQUIREMENTS_FILE}
- pip install --no-index --find-links=wheels -r ${REQUIREMENTS_FILE}
artifacts:
expire_in: 1 day
paths:
- wheels
- .venv
install:python3.6:
extends: .install
image: python:3.6
install:python3.7:
extends: .install
image: python:3.7
.test:
stage: test
services:
- mdillon/postgis:11-alpine
variables:
DATABASE_URL: postgis://django:secret@mdillon-postgis:5432/django_test
DJANGO_LOG_FILE: /dev/null
POSTGRES_DB: django_test
POSTGRES_USER: django
POSTGRES_PASSWORD: secret
before_script:
- source .venv/bin/activate
- apt-get update
- apt-get install -y python3-gdal
- cd ausgsteckt
script:
- python manage.py test
coverage: '/^TOTAL.*\s([0-9\.]+)%$/'
artifacts:
reports:
junit: report.xml
test:python3.6:
extends: .test
image: python:3.6
dependencies:
- install:python3.6
test:python3.7:
extends: .test
image: python:3.7
dependencies:
- install:python3.7