-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
91 lines (83 loc) · 1.34 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
default:
image: python:latest
stages:
- demo
- test
- build
- publish
python3.8:
image: python:3.8
variables:
GIT_SUBMODULE_STRATEGY: recursive
stage: test
script:
- pip install hatch
- hatch run dev:test
coverage:
variables:
GIT_SUBMODULE_STRATEGY: recursive
stage: test
script:
- pip install hatch
- hatch run dev:coverage
coverage: "/TOTAL.+ ([0-9]{1,3}%)/"
artifacts:
when: always
reports:
junit: report.xml
coverage_report:
coverage_format: cobertura
path: coverage.xml
paths:
- build/coverage
sast:
stage: test
include:
- template: Security/SAST.gitlab-ci.yml
build_docs:
stage: build
script:
- pip install hatch
- hatch run docs:html
artifacts:
paths:
- build/docs/html
only:
- main
- staging
pages:
stage: publish
dependencies:
- coverage
- build_docs
script:
- mv build/docs/html public
- mv build/coverage public/.
artifacts:
paths:
- public
only:
- main
- staging
package:
stage: build
script:
- pip install hatch
- hatch build --clean
only:
- main
- staging
- tags
artifacts:
paths:
- dist
pypi:
stage: publish
dependencies:
- package
script:
- pip install hatch
- hatch publish -n
when: manual
only:
- tags