-
Notifications
You must be signed in to change notification settings - Fork 24
/
.gitlab-ci.yml
56 lines (48 loc) · 1.46 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
stages:
- test
# run the following commands before running any commands in any jobs
before_script:
- wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- if [ -x ${CI_PROJECT_DIR}/miniconda3/pkgs ]; then pushd ${HOME}/miniconda3/pkgs && find -maxdepth 1 -mindepth 1 -type d | xargs rm -rf && popd; fi
- chmod +x miniconda.sh
- "./miniconda.sh -b -f"
- "/root/miniconda3/bin/conda update conda --yes"
# set up the basic job that will be extended by the main jobs
.runtest:
script:
- "/root/miniconda3/bin/conda env create -f .ci_support/${PYVERSION}.yaml -n parserdev"
- "/root/miniconda3/envs/parserdev/bin/python3 -V"
- "/root/miniconda3/envs/parserdev/bin/pip install -e ."
- "/root/miniconda3/envs/parserdev/bin/python -m nltk.downloader -d ${HOME}/nltk_data punkt"
- "/root/miniconda3/envs/parserdev/bin/nosetests --nologcapture --verbose tests"
# all 3 python versions should run in parallel
# python 3.7 tests
test-3.7:
extends: ".runtest"
variables:
PYVERSION: "3.7"
stage: "test"
# python 3.8 tests
test-3.8:
extends: ".runtest"
variables:
PYVERSION: "3.8"
stage: "test"
# python 3.9 tests
test-3.9:
extends: ".runtest"
variables:
PYVERSION: "3.9"
stage: "test"
# python 3.10 tests
test-3.10:
extends: ".runtest"
variables:
PYVERSION: "3.10"
stage: "test"
# python 3.11 tests
test-3.11:
extends: ".runtest"
variables:
PYVERSION: "3.11"
stage: "test"