-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
45 lines (41 loc) · 905 Bytes
/
.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
stages:
# - build
- test
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
PRE_COMMIT_HOME: "$CI_PROJECT_DIR/.cache/pre-commit"
RUFF_CACHE_DIR: "$CI_PROJECT_DIR/.cache/ruff_cache"
MYPY_CACHE_DIR: "$CI_PROJECT_DIR/.cache/mypy_cache"
cache:
key: $CI_PROJECT_NAME
paths:
- .cache/
test:
stage: test
needs: []
tags:
- u61
- docker
image: python:3.12
script:
- pip install .[dev]
- pytest --cov musiclib --cov-report term --cov-report xml --junitxml report.xml
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts:
when: always
expire_in: 1 week
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
junit: report.xml
lint:
stage: test
needs: []
tags:
- u61
- docker
image: python:3.12
script:
- pip install .[dev]
- pre-commit run --all-files