File tree 2 files changed +65
-0
lines changed
2 files changed +65
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : testtask CI pipeline
2
+ on : [push]
3
+
4
+ jobs :
5
+ build :
6
+ runs-on : ubuntu-latest
7
+
8
+ steps :
9
+ - uses : actions/checkout@v4
10
+
11
+ - name : Set up JDK 17
12
+ uses : actions/setup-java@v3
13
+ with :
14
+ java-version : ' 17'
15
+ distribution : ' temurin'
16
+ cache : maven
17
+
18
+
19
+ - name : Build with Maven
20
+ run : mvn clean install --batch-mode
21
+
22
+ - name : Run tests
23
+ run : mvn test
24
+
25
+ - name : Generate code coverage report
26
+ run : mvn jacoco:report
27
+
28
+ - name : Upload test report
29
+ uses : actions/upload-artifact@v4
30
+ with :
31
+ name : surefire-report
32
+ path : target/surefire-reports/
33
+
34
+ - name : Upload JaCoCo report
35
+ uses : actions/upload-artifact@v4
36
+ with :
37
+ name : jacoco-report
38
+ path : target/site/jacoco/
Original file line number Diff line number Diff line change 99
99
<artifactId >spring-boot-starter-test</artifactId >
100
100
<scope >test</scope >
101
101
</dependency >
102
+ <!-- Jacoco -->
103
+ <dependency >
104
+ <groupId >org.jacoco</groupId >
105
+ <artifactId >jacoco-maven-plugin</artifactId >
106
+ <version >0.8.13</version >
107
+ </dependency >
102
108
<dependency >
103
109
<groupId >org.springframework.boot</groupId >
104
110
<artifactId >spring-boot-testcontainers</artifactId >
166
172
</annotationProcessorPaths >
167
173
</configuration >
168
174
</plugin >
175
+ <plugin >
176
+ <groupId >org.jacoco</groupId >
177
+ <artifactId >jacoco-maven-plugin</artifactId >
178
+ <version >0.8.13</version >
179
+ <executions >
180
+ <execution >
181
+ <id >prepare-agent</id >
182
+ <goals >
183
+ <goal >prepare-agent</goal >
184
+ </goals >
185
+ </execution >
186
+ <execution >
187
+ <id >jacoco-site-aggregate</id >
188
+ <phase >verify</phase >
189
+ <goals >
190
+ <goal >report</goal >
191
+ </goals >
192
+ </execution >
193
+ </executions >
194
+ </plugin >
195
+
169
196
170
197
<!-- Spring Boot Maven Plugin -->
171
198
<plugin >
You can’t perform that action at this time.
0 commit comments