-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.gitlab-ci.yml
68 lines (59 loc) · 1.59 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
default:
image: "ubuntu:latest"
before_script:
- apt-get update
- apt-get -y install software-properties-common sudo g++
- apt-get -y install pip vim git
- apt-get -y install libgsl-dev
- python3 --version
- pip3 install --break-system-packages numpy
- pip3 install --break-system-packages -r requirements-dev.txt
.install_evaluate:
script:
- pip3 install --break-system-packages -r requirements.txt
- pip3 install --break-system-packages .
stages:
- Static Analysis
- Test
black:
stage: Static Analysis
script:
- black --check --config pyproject.toml .
allow_failure: true
flake8:
stage: Static Analysis
script:
- flake8
allow_failure: true
isort:
stage: Static Analysis
script:
- isort --profile black --filter-files -c --skip ipal_transcriber --skip ipal_ids_framework --skip build .
allow_failure: true
cffconvert:
stage: Static Analysis
script:
- cffconvert --validate -i CITATION.cff
allow_failure: true
execute:
stage: Test
script:
- !reference [.install_evaluate, script]
- ./ipal-evaluate --version
- ./ipal-plot-alerts --version
- ./ipal-plot-metrics --version
- ./ipal-tune --version
pytest:
stage: Test
script:
- !reference [.install_evaluate, script]
- python3 -m pytest -vv --cov=metrics --cov=evaluate --cov-report term --cov-report xml:coverage.xml --cov-branch
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts:
when: always
paths:
- tests/snapshots/output/*
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml