Skip to content

Commit 196206d

Browse files
committed
build: collect JaCoCo coverage in maintenance CI
1 parent ad41d86 commit 196206d

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# - push / pull_request on the feature/2.0.x branch
55
# - manual workflow_dispatch
66
#
7-
# Runs `./mvnw -B clean verify` which includes the JaCoCo coverage gate
7+
# Runs `./mvnw -B clean verify` which includes the JaCoCo coverage report
88
# (90% line coverage, haltOnFailure=false) configured in the POM.
99
name: CI
1010

@@ -34,7 +34,7 @@ jobs:
3434
java-version: '17'
3535
cache: maven
3636

37-
- name: Build and verify with JaCoCo coverage gate
37+
- name: Build and verify with JaCoCo coverage
3838
run: ./mvnw -B --no-transfer-progress clean verify
3939

4040
- name: Upload JaCoCo coverage report
@@ -43,6 +43,7 @@ jobs:
4343
with:
4444
name: jacoco-coverage
4545
path: target/site/jacoco
46+
if-no-files-found: error
4647
retention-days: 14
4748

4849
- name: Upload surefire reports

‎pom.xml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
<maven-resources-plugin.version>3.5.0</maven-resources-plugin.version>
8080
<maven-source-plugin.version>3.4.0</maven-source-plugin.version>
8181
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
82+
<argLine></argLine>
8283
</properties>
8384
<!-- 依赖版本统一管理(dependencyManagement) -->
8485
<dependencyManagement>
@@ -315,7 +316,7 @@
315316
<configuration>
316317
<skip>false</skip>
317318
<skipTests>false</skipTests>
318-
<argLine>-Xmx1024m -Dfile.encoding=UTF-8</argLine>
319+
<argLine>@{argLine} -Xmx1024m -Dfile.encoding=UTF-8</argLine>
319320
<additionalClasspathElements>
320321
<additionalClasspathElement>${basedir}/target/test-classes</additionalClasspathElement>
321322
</additionalClasspathElements>

0 commit comments

Comments
 (0)