-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
160 lines (153 loc) · 3.79 KB
/
.gitlab-ci.yml
File metadata and controls
160 lines (153 loc) · 3.79 KB
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
workflow:
name: CI
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
image:
name: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/maven:3.9.15-eclipse-temurin-21-alpine
stages:
- build
- test
- grading
build:
stage: build
artifacts:
when: always
paths:
- target
script:
- mvn -V --color always -ntp -fae test-compile -Pci
analysis:
stage: test
artifacts:
when: always
paths:
- target
script:
- mvn -V --color always -ntp verify -Pci -DskipTests -DskipITs
test:
stage: test
needs:
- analysis
artifacts:
when: always
paths:
- target
script:
- mvn -V --color always -ntp -fae verify -Pci
pitest:
stage: test
needs:
- test
artifacts:
when: always
paths:
- target
script:
- mvn -V --color always -ntp -Pci -Ppit
autograding:
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/uhafner/autograding-gitlab-action:v5.3.0
stage: grading
when: always
script:
- java -cp @/app/jib-classpath-file edu.hm.hafner.grading.gitlab.GitLabAutoGradingRunner
variables:
MAX_WARNING_COMMENTS: 10
MAX_COVERAGE_COMMENTS: 10
SKIP_COMMIT_COMMENTS: true
CONFIG: |
{
"tests": {
"name": "Tests",
"id": "tests",
"tools": [
{
"id": "junit",
"name": "JUnit Tests",
"pattern": "**/target/*-reports/TEST*.xml"
}
],
"failureRateImpact": -1,
"maxScore": 100
},
"analysis": [
{
"name": "Style",
"id": "style",
"tools": [
{
"id": "checkstyle",
"name": "CheckStyle",
"pattern": "**/target/checkstyle-*/checkstyle-result.xml"
},
{
"id": "pmd",
"name": "PMD",
"pattern": "**/target/pmd-*/pmd.xml"
}
],
"errorImpact": -1,
"highImpact": -1,
"normalImpact": -1,
"lowImpact": -1,
"maxScore": 100
},
{
"name": "Bugs",
"id": "bugs",
"icon": "bug",
"tools": [
{
"id": "spotbugs",
"name": "SpotBugs",
"sourcePath": "src/main/java",
"pattern": "**/target/spotbugsXml.xml"
}
],
"errorImpact": -3,
"highImpact": -3,
"normalImpact": -3,
"lowImpact": -3,
"maxScore": 100
}
],
"coverage": [
{
"name": "Code Coverage",
"tools": [
{
"id": "jacoco",
"metric": "line",
"sourcePath": "src/main/java",
"pattern": "**/target/site/jacoco/jacoco.xml"
},
{
"id": "jacoco",
"metric": "branch",
"sourcePath": "src/main/java",
"pattern": "**/target/site/jacoco/jacoco.xml"
}
],
"maxScore": 100,
"missedPercentageImpact": -1
},
{
"name": "Mutation Coverage",
"tools": [
{
"id": "pit",
"metric": "mutation",
"sourcePath": "src/main/java",
"pattern": "**/target/pit-reports/mutations.xml"
},
{
"id": "pit",
"metric": "test-strength",
"sourcePath": "src/main/java",
"pattern": "**/target/pit-reports/mutations.xml"
}
],
"maxScore": 100,
"missedPercentageImpact": -1
}
]
}