-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
83 lines (70 loc) · 1.54 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
image: python:3.7
services:
- postgres:9.6
- redis:3.2
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
POSTGRES_DB: myproject
cache:
key: "test"
paths:
- .cache/pip
- venv/
before_script:
- python --version
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
- pip install -r requirements.txt
stages:
- test_functionality
- pep8
- test_notebooks
pep8:
stage: pep8
artifacts:
when: on_failure
paths:
- flake8-report.txt
expire_in: 1 week
script:
- flake8 --statistics --output-file flake8-report.txt
default_simulation:
stage: test_functionality
script:
- python3 tests/performance.py
.test_notebook: &test_notebook
stage: test_notebooks
script:
- cd examples
- jupyter nbconvert --to script ${NOTEBOOK}.ipynb
- ipython3 ${NOTEBOOK}.py
artifacts:
paths:
- pics/${FIGURE}
expire_in: 1 week
con_contact:
variables:
NOTEBOOK: con_contact
FIGURE: Contagion_Contact_Tracing.png
<<: *test_notebook
con_example:
variables:
NOTEBOOK: con_example
FIGURE: none
<<: *test_notebook
con_parameter_scan:
variables:
NOTEBOOK: con_parameter_scan
FIGURE: Contagion_Contact_Rate_Scan.png
<<: *test_notebook
con_tracing:
variables:
NOTEBOOK: con_tracing
FIGURE: Contagion_Tracing.png
<<: *test_notebook
con_distributions:
variables:
NOTEBOOK: con_distributions
FIGURE: Contagion_Distributions.png
<<: *test_notebook