-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
47 lines (43 loc) · 1.33 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
before_script:
- export GIT_SSL_NO_VERIFY=1
- export PATH="$HOME/miniconda2/bin:$PATH"
# 2024-09-04: We deleted autosubmit3 env (00:00:04).
# - conda env remove -y -n autosubmit3
# 2024-09-04: Installed a new env autosubmit4 (00:00:55).
# - conda create -n autosubmit4 python=3.9 graphviz bcrypt pip sqlite rsync curl
# And then we use this environment to create venv's (faster) and install Autosubmit.
# We always activate the same environment
- conda activate autosubmit4
- test -f venv/bin/python || python3 -m venv venv
- source venv/bin/activate
- python3 -V
stages:
- test
- docs
cache:
paths:
- test/coverage.xml
- test/unit/files
- venv
test_python3:
stage: test
script:
- pip install --upgrade pip
# This installs default dependencies, plus those for running tests and for building docs.
- pip install -e .[tests]
- pytest
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
# These artifacts are saved with every build in GitLab and can be reviewed later. If
# we have a folder with HTML files, as in this example, users can navigate with their
# browser.
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: test/coverage.xml
docs:
stage: docs
script:
- pip install -e .[docs]
- cd docs
- make html