-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
54 lines (51 loc) · 985 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
46
47
48
49
50
51
52
53
54
---
stages:
- test
- release
pre-commit:
stage: test
image: alpine:latest
variables:
SANIC_NO_UVLOOP: "true"
SANIC_NO_UJSON: "true"
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
VENV: ${CI_PROJECT_DIR}/.venv
cache:
key: pre-commit
paths:
- ${PRE_COMMIT_HOME}
- ${VENV}
policy: pull-push
script:
- .gitlab-ci/pre-commit.sh
coverage: '/TOTAL.*\s+(\d+%)$/'
artifacts:
paths:
- coverage.xml
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
junit: pytest.xml
sphinx-build:
stage: test
image: python:3.10-alpine
variables:
VENV: ${CI_PROJECT_DIR}/.venv
cache:
key: pre-commit
paths:
- ${VENV}
policy: pull-push
script:
- .gitlab-ci/sphinx-build.sh
release-pypi:
stage: release
image: alpine:latest
cache: []
script:
- apk --no-cache add bash
- .gitlab-ci/release-pypi.sh
only:
refs:
- tags