-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
65 lines (57 loc) · 1.53 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
65 lines (57 loc) · 1.53 KB
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
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/pip-cache"
cache:
paths:
- $PIP_CACHE_DIR
- $CI_PROJECT_DIR/venv
key: $CI_PROJECT_ID
tests:
image: python:3.12
script:
- python -m venv venv
- . venv/bin/activate
- pip install -U pip
- pip install git+https://gitlab.com/ase/ase.git
- pip install git+https://gitlab.com/asr-dev/asr.git
- pip install .[test,optimade]
- coverage run --branch -m pytest -v --color=yes --junit-xml=junit.xml
- coverage report -i --precision=2 --skip-covered --sort=miss
- coverage html --skip-covered
- coverage xml --data-file .coverage
- mypy
- flake8 camdweb
coverage: '/TOTAL +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+ +([0-9]+\.[0-9]+%)/'
artifacts:
paths:
- htmlcov
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
junit: junit.xml
expire_in: 1 week
rules:
- if: $CI_PIPELINE_SOURCE == "push"
- if: $SCHEDULED_MONITOR_JOB == "monitor"
when: never
oldtests:
image: python:3.10
script:
- python -m venv venv
- . venv/bin/activate
- pip install -U pip
- pip install git+https://gitlab.com/ase/ase.git
- pip install git+https://gitlab.com/asr-dev/asr.git
- pip install pytest boddle
- pip install .
- pytest -v --color=yes
when: manual
monitoring:
image: python:3.12
script:
- python camdweb/monitor.py
rules:
- if: $CI_PIPELINE_SOURCE == "push"
when: manual
allow_failure: true
- if: $SCHEDULED_MONITOR_JOB == "monitor"