-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
50 lines (46 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
default:
image: python:3.9-buster
before_script:
- python --version
- pip install .[extras]
- pip install pytest
- pip install pdoc
- pip install git+https://github.com/cat-cfs/libcbm_py.git@1.x
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/bioeconomy/eu_cbm/eu_cbm_aidb.git
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/bioeconomy/eu_cbm/eu_cbm_data.git
# Tell eu_cbm_hat where the data are located
- export EU_CBM_DATA="$CI_PROJECT_DIR/eu_cbm_data/"
- export EU_CBM_AIDB="$CI_PROJECT_DIR/eu_cbm_aidb/"
- python scripts/setup/aidb_symlink.py
stages:
- document
- test
pages:
stage: document
script:
# GitLab Pages will only publish files in the public directory
- pdoc -o public ./eu_cbm_hat
#- pdoc -o test ./eu_cbm_hat/core
artifacts:
paths:
- public
only:
- main
interruptible: true
libcbm_run:
stage: test
script:
# Test individual methods or functions
- pytest --junitxml=report.xml eu_cbm_hat
# Test a complete model run
# The following test depends on ZZ data stored in the (private) eu_cbm_data repository
- python scripts/running/run_zz.py
# The following test doesn't depend on the eu_cbm_data repository.
# It uses ZZ data stored in the (public) eu_cbm_hat package.
- python scripts/running/run_zz_in_temp_dir_without_eu_cbm_data.py
# The post_processing documentation test need the output of the zz run
- pytest --doctest-modules eu_cbm_hat/post_processor/nai.py
artifacts:
when: always
reports:
junit: report.xml