forked from truemped/supercell
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.gitlab-ci.yml
132 lines (113 loc) · 2.64 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
variables:
PIP_CACHE_DIR: "${CI_PROJECT_DIR}/.cache/pip"
.test_template:
stage: test
cache:
key: ${CI_JOB_NAME}
paths:
- .cache/pip
artifacts:
expire_in: 1 day
paths:
- coverage.xml
- pylint-report.txt
script:
- make install
- make test
- set +e
- 'env/bin/pylint supercell --jobs=1 --reports=no --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" > pylint-report.txt'
- cat pylint-report.txt
coverage: '/^TOTAL.*\s+(\d+\%)$/'
.sonar_template:
stage: sonar
image: ciricihq/gitlab-sonar-scanner
before_script:
- export SONAR_ANALYSIS_MODE=publish
- projectVersion=$(awk -F\" '/^__version__ = / {print $2}' supercell/version.py)
- echo sonar.projectVersion=${projectVersion} >> sonar-project.properties
- echo "sonar.projectKey=RTR:${projectKey}" >> sonar-project.properties
- 'echo "sonar.projectName=Python :: ${projectKey}" >> sonar-project.properties'
- echo "sonar.sources=supercell" >> sonar-project.properties
- echo "sonar.python.coverage.reportPath=coverage.xml" >> sonar-project.properties
- echo "sonar.python.pylint.reportPath=pylint-report.txt" >> sonar-project.properties
script:
- tail -2 sonar-project.properties
- ls -l coverage.xml
- sonar-scanner-run.sh
only:
- develop
stages:
- test
- sonar
test:36:
extends: .test_template
image: python:3.6
test:37:
extends: .test_template
image: python:3.7
test:38:
extends: .test_template
image: python:3.8
test:39:
extends: .test_template
image: python:3.9
test:310:
extends: .test_template
image: python:3.10
test:311:
extends: .test_template
image: python:3.11
test:312:
extends: .test_template
image: python:3.12
test:313:
extends: .test_template
image: python:3.13
sonar:36:
extends: .sonar_template
dependencies:
- test:36
variables:
projectKey: supercell-36
sonar:37:
extends: .sonar_template
dependencies:
- test:37
variables:
projectKey: supercell-37
sonar:38:
extends: .sonar_template
dependencies:
- test:38
variables:
projectKey: supercell-38
sonar:39:
extends: .sonar_template
dependencies:
- test:39
variables:
projectKey: supercell-39
sonar:310:
extends: .sonar_template
dependencies:
- test:310
variables:
projectKey: supercell-310
sonar:311:
extends: .sonar_template
dependencies:
- test:311
variables:
projectKey: supercell-311
sonar:312:
extends: .sonar_template
dependencies:
- test:312
variables:
projectKey: supercell-312
sonar:313:
extends: .sonar_template
dependencies:
- test:313
variables:
projectKey: supercell-313