-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitlab-ci.yml
161 lines (149 loc) · 4.58 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# -*- coding: utf-8 -*-
#
# This file is part of the shibboleth-authenticator module for Invenio.
# Copyright (C) 2018 HZDR
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
services:
- redis:alpine
- postgres:alpine
- mysql:5
variables:
POSTGRES_USER: postgres
POSTGRES_DB: test
ACCOUNTS_SESSION_REDIS_URL: "redis://redis:6379/0"
PIP_CACHE_DIR: pip-cache
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_USER: test
MYSQL_PASSWORD: test
MYSQL_DATABASE: test
cache:
paths:
- pip-cache
before_script:
- apt-get update
- apt-get install -qy libxml2-dev libxmlsec1-dev libxmlsec1-openssl
- pip install --upgrade pip setuptools py
- pip install coveralls requirements-builder
- requirements-builder -e $EXTRAS --level=$REQUIREMENTS setup.py > .ci-$REQUIREMENTS-requirements.txt
- pip install -r .ci-$REQUIREMENTS-requirements.txt
- pip install -e .[$EXTRAS]
py3.5-min-sqlite:
stage: test
image: python:3.5
variables:
SQLALCHEMY_DATABASE_URI: "sqlite:///test.db"
EXTRAS: all,sqlite
REQUIREMENTS: min
script:
- ./run-tests.sh
py3.5-pypi-sqlite:
stage: test
image: python:3.5
variables:
SQLALCHEMY_DATABASE_URI: "sqlite:///test.db"
EXTRAS: all,sqlite
REQUIREMENTS: pypi
script:
- ./run-tests.sh
py3.5-min-postgresql:
stage: test
image: python:3.5
variables:
SQLALCHEMY_DATABASE_URI: "postgresql+psycopg2://postgres@postgres:5432/test"
EXTRAS: all,postgresql
REQUIREMENTS: min
script:
- ./run-tests.sh
py3.5-pypi-postgresql:
stage: test
image: python:3.5
variables:
SQLALCHEMY_DATABASE_URI: "postgresql+psycopg2://postgres@postgres:5432/test"
EXTRAS: all,postgresql
REQUIREMENTS: pypi
script:
- ./run-tests.sh
py3.5-min-mysql:
stage: test
image: python:3.5
variables:
SQLALCHEMY_DATABASE_URI: "mysql+pymysql://test:test@mysql:3306/test"
EXTRAS: all,mysql
REQUIREMENTS: min
script:
- ./run-tests.sh
py3.5-pypi-mysql:
stage: test
image: python:3.5
variables:
SQLALCHEMY_DATABASE_URI: "mysql+pymysql://test:test@mysql:3306/test"
EXTRAS: all,mysql
REQUIREMENTS: pypi
script:
- ./run-tests.sh
ubuntu-bionic:
stage: test
image: ubuntu:bionic
variables:
SQLALCHEMY_DATABASE_URI: "postgresql+psycopg2://postgres@postgres:5432/test"
EXTRAS: all,postgresql
REQUIREMENTS: pypi
LC_ALL: C.UTF-8
LANG: C.UTF-8
cache:
key: "bionic-pip"
paths:
- pip-cache
before_script:
- apt-get update
# Install Python
- apt-get install -qy python3 python3-dev build-essential curl git-core
- ln -s /usr/bin/python3 /usr/bin/python
- curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py && rm get-pip.py
- apt-get install -qy libxml2-dev libxmlsec1-dev libxmlsec1-openssl
- pip install --upgrade pip setuptools py
- pip install coveralls requirements-builder
- requirements-builder -e $EXTRAS --level=$REQUIREMENTS setup.py > .ci-$REQUIREMENTS-requirements.txt
- pip install -r .ci-$REQUIREMENTS-requirements.txt
- pip install -e .[$EXTRAS]
script:
- ./run-tests.sh
ubuntu-xenial:
stage: test
image: ubuntu:xenial
variables:
SQLALCHEMY_DATABASE_URI: "postgresql+psycopg2://postgres@postgres:5432/test"
EXTRAS: all,postgresql
REQUIREMENTS: pypi
LC_ALL: C.UTF-8
LANG: C.UTF-8
cache:
key: "xenial-pip"
paths:
- pip-cache
before_script:
- apt-get update
# Install Python
- apt-get install -qy python3 python3-dev build-essential curl git-core
- ln -s /usr/bin/python3 /usr/bin/python
- curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py && rm get-pip.py
- apt-get install -qy libxml2-dev libxmlsec1-dev libxmlsec1-openssl
- pip install --upgrade pip setuptools py
- pip install coveralls requirements-builder
- requirements-builder -e $EXTRAS --level=$REQUIREMENTS setup.py > .ci-$REQUIREMENTS-requirements.txt
- pip install -r .ci-$REQUIREMENTS-requirements.txt
- pip install -e .[$EXTRAS]
script:
- ./run-tests.sh