forked from DIRACGrid/diracx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
45 lines (41 loc) · 1.11 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
.defaults:
only:
- merge_requests
- master@chaen/chrissquare-hack-a-ton
.defaults-micromamba:
extends: .defaults
image: registry.cern.ch/docker.io/mambaorg/micromamba
before_script:
- micromamba env create --file environment.yml --name test-env
- eval "$(micromamba shell hook --shell=bash)"
- micromamba activate test-env
- pip install git+https://github.com/DIRACGrid/DIRAC.git@integration
- pip install .
pre-commit:
extends: .defaults
image: registry.cern.ch/docker.io/library/python:3.11
variables:
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
cache:
paths:
- ${PRE_COMMIT_HOME}
before_script:
- pip install pre-commit
script:
- pre-commit run --all-files
pytest:
extends: .defaults-micromamba
script:
- pytest . --cov-report=xml:coverage.xml --junitxml=report.xml
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts:
when: always
reports:
junit: report.xml
coverage_report:
coverage_format: cobertura
path: coverage.xml
mypy:
extends: .defaults-micromamba
script:
- mypy .