-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
89 lines (74 loc) · 2.27 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
variables:
PYTHON_VER: "3.9"
stages:
- test
cache:
paths:
- ./$CI_PIPELINE_ID
before_script:
- pwd
- echo $CI_PIPELINE_ID
- source activate ./$CI_PIPELINE_ID
configure_env:
stage: .pre
image: registry.orr.noaa.gov/erd/centos-conda/centos7-python$PYTHON_VER
before_script:
- echo '' # manual override of before_script because we're on runner 12.3 and inherit options are only 12.9+
script:
- conda create --prefix ./$CI_PIPELINE_ID
tags:
- docker
artifacts:
expire_in: 5 days
paths:
- ./$CI_PIPELINE_ID
test_libgoods:
stage: test
allow_failure: false
image: registry.orr.noaa.gov/erd/centos-conda/centos7-python$PYTHON_VER
script:
- cd libgoods
- conda install mamba
- mamba install -y python=$PYTHON_VER --file conda_requirements.txt
--file conda_requirements_test.txt
--file ../model_catalogs/conda_requirements.txt
- pip install ./
- pip install -e ../model_catalogs/
- cd ../ # make sure that it won't find the source package.
- pytest --pyargs libgoods
test_model_catalogs:
stage: test
allow_failure: false
image: registry.orr.noaa.gov/erd/centos-conda/centos7-python$PYTHON_VER
script:
- cd model_catalogs
- conda install mamba
- mamba install -y python=$PYTHON_VER --file conda_requirements.txt
--file conda_requirements_test.txt
- pip install -r pip_requirements.txt
# tests do not pass with a full install -- need editable mode.
- pip install --no-deps -e ./
- pytest model_catalogs/tests/
# test_pygnome_develop:
# stage: test
# allow_failure: true
# image: registry.orr.noaa.gov/erd/centos-conda/centos7-python$PYTHON_VER
# except:
# - master
# - production
# script:
# - conda install -y --file conda_requirements_test.txt
# - cd ./py_gnome/tests/unit_tests && pytest --runslow
# tags:
# - docker
# test_pygnome:
# stage: test
# allow_failure: false
# image: registry.orr.noaa.gov/erd/centos-conda/centos7-python$PYTHON_VER
# # except:
# # - develop
# script:
# - conda install -y --file conda_requirements_test.txt
# - cd ./py_gnome/tests/unit_tests && pytest --runslow
# tags:
# - docker