-
Notifications
You must be signed in to change notification settings - Fork 1
118 lines (113 loc) · 3.61 KB
/
autograding.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
name: 'Autograding PR'
on:
pull_request:
jobs:
build:
runs-on: [ubuntu-latest]
name: Build, test and autograde on Ubuntu
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
check-latest: true
cache: 'maven'
- name: Set up Maven
uses: stCarolas/setup-maven@v4.5
with:
maven-version: 3.9.5
- name: Build with Maven
run: mvn -V --color always -ntp clean verify --file pom.xml '-Djenkins.test.timeout=5000' '-Dgpg.skip' -Ppit | tee maven.log
- name: Extract pull request number
uses: jwalton/gh-find-current-pr@v1
id: pr
- name: Run Autograding
uses: uhafner/autograding-github-action@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
pr-number: ${{ steps.pr.outputs.number }}
checks-name: 'Quality Checks'
config: >
{
"tests": {
"tools": [
{
"id": "test",
"name": "Unittests",
"pattern": "**/target/*-reports/TEST*.xml"
}
],
"name": "JUnit",
"passedImpact": 0,
"skippedImpact": -1,
"failureImpact": -5,
"maxScore": 100
},
"analysis": {
"name": "Warnings",
"id": "warnings",
"tools": [
{
"id": "checkstyle",
"name": "CheckStyle",
"pattern": "**/target/checkstyle-result.xml"
},
{
"id": "pmd",
"name": "PMD",
"pattern": "**/target/pmd.xml"
},
{
"id": "error-prone",
"name": "Error Prone",
"pattern": "**/maven.log"
},
{
"id": "spotbugs",
"name": "SpotBugs",
"pattern": "**/target/spotbugsXml.xml"
}
],
"errorImpact": -1,
"highImpact": -1,
"normalImpact": -1,
"lowImpact": -1,
"maxScore": 100
},
"coverage": [
{
"tools": [
{
"id": "jacoco",
"name": "Line Coverage",
"metric": "line",
"pattern": "**/target/site/jacoco/jacoco.xml"
},
{
"id": "jacoco",
"name": "Branch Coverage",
"metric": "branch",
"pattern": "**/target/site/jacoco/jacoco.xml"
}
],
"name": "JaCoCo",
"maxScore": 100,
"missedPercentageImpact": -1
},
{
"tools": [
{
"id": "pit",
"name": "Mutation Coverage",
"metric": "mutation",
"pattern": "**/target/pit-reports/mutations.xml"
}
],
"name": "PIT",
"maxScore": 100,
"missedPercentageImpact": -1
}
]
}