-
Notifications
You must be signed in to change notification settings - Fork 8
/
.gitlab-ci.yml
72 lines (65 loc) · 2.41 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
variables:
AWS_DEFAULT_REGION: "us-east-1"
DSS_SECRETS_STORE: "dcp/dss"
DSS_TEST_STAGE: "dev"
BOTO_CONFIG: "/dev/null"
stages:
- test
.linux-test-base:
stage: test
image: ubuntu:18.04
before_script:
- IFS='.'; semver=($PYTHON_VERSION); PYTHON_MAJOR=${semver[0]}; unset IFS
- export DEBIAN_FRONTEND=noninteractive
- apt-get update --quiet
- apt-get install --assume-yes --no-install-recommends software-properties-common
- add-apt-repository --yes ppa:deadsnakes/ppa
- apt-get update --quiet
- apt-get install --assume-yes --no-install-recommends curl jq make python${PYTHON_MAJOR/2/}-pip python${PYTHON_VERSION}-dev
- python${PYTHON_VERSION} -m pip install --upgrade pip==10.0.1
- python${PYTHON_VERSION} -m pip install virtualenv==16.0.0
- rm -f /usr/bin/python; ln -s /usr/bin/python${PYTHON_VERSION} /usr/bin/python
- rm -f /usr/bin/pip; ln -s /usr/bin/pip${PYTHON_MAJOR} /usr/bin/pip
- virtualenv ~/venv
- source ~/venv/bin/activate
- pip install -r requirements-dev.txt
- scripts/fetch_secret.sh gcp-credentials.json > gcp-credentials.json
- export GOOGLE_APPLICATION_CREDENTIALS=$(pwd -P)/gcp-credentials.json
- sed -i -e s/dss.data.humancellatlas.org/dss.$DSS_TEST_STAGE.data.humancellatlas.org/ hca/default_config.json
script:
- make test
except:
- tags
.windows-test-base:
stage: test
before_script:
# currently 3.6.8 is offered by the windows-runner
- python --version
- $env:WINDOWS_PYTHON = python -c 'import sys ; print(sys.version[0:3])'
- if (-NOT $env:WINDOWS_PYTHON -eq ${PYTHON_VERSION}) { echo "python missmatch"; exit(1) }
- virtualenv venv3
- venv3\Scripts\activate
- pip install -r requirements-dev.txt
- python .\scripts\fetch_secret.py --secret-name gcp-credentials.json --write
- $env:GOOGLE_APPLICATION_CREDENTIALS = (Convert-Path .\gcp-credentials.json)
- (Get-Content .\hca\default_config.json).replace('dss.data.humancellatlas.org',"dss.${DSS_TEST_STAGE}.data.humancellatlas.org")| Set-Content .\hca\default_config.json
script:
- make test-win
test-3.5:
extends: .linux-test-base
variables:
PYTHON_VERSION: "3.5"
test-3.6:
extends: .linux-test-base
variables:
PYTHON_VERSION: "3.6"
test-3.6-win:
extends: .windows-test-base
variables:
PYTHON_VERSIO: "3.6"
tags:
- windows
test-3.7:
extends: .linux-test-base
variables:
PYTHON_VERSION: "3.7"