From 4770316898afbf37d4fce2b50b27d111b0982f9e Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Sun, 4 Apr 2021 15:21:53 +0200 Subject: [PATCH 1/3] Fix JaCoCo execution when we have additional Surefire options Typically on Java 16. --- pom.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 1e62898458..1198b18d30 100644 --- a/pom.xml +++ b/pom.xml @@ -46,6 +46,7 @@ false 0.11.2 + @@ -107,6 +108,9 @@ prepare-agent + + jacoco.surefire.argLine + @@ -274,7 +278,7 @@ default-test src/test/resources/slow-or-flaky-tests.txt - ${surefire.argLine} + @{jacoco.surefire.argLine} ${surefire.argLine} @@ -582,7 +586,7 @@ src/test/resources/slow-or-flaky-tests.txt - ${surefire.argLine} + @{jacoco.surefire.argLine} ${surefire.argLine} From 43ed7c7ac7182034e5fac7c0a311a97a549120aa Mon Sep 17 00:00:00 2001 From: Liam Newman Date: Mon, 5 Apr 2021 09:58:55 -0700 Subject: [PATCH 2/3] Add verification that jacoco.exec exists after run --- pom.xml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/pom.xml b/pom.xml index 1198b18d30..e13135e546 100644 --- a/pom.xml +++ b/pom.xml @@ -646,6 +646,30 @@ + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M3 + + + enforce-jacoco-exist + verify + + enforce + + + + + + ${project.build.directory}/jacoco.exec + + + + true + + + + From 6167d196d9f3323e1026e22914032d806ab70c9b Mon Sep 17 00:00:00 2001 From: Liam Newman Date: Mon, 5 Apr 2021 10:13:14 -0700 Subject: [PATCH 3/3] Remove enable-ci from build-only job `enable-ci` doesn't make sense with `skipTests`. The point of this job is get quick results. --- .github/workflows/maven-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index 8a2b59f8d8..2fa86ff42a 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -30,7 +30,7 @@ jobs: - name: Maven Install (skipTests) env: MAVEN_OPTS: ${{ env.JAVA_11_PLUS_MAVEN_OPTS }} - run: mvn -B install -DskipTests -D enable-ci --file pom.xml + run: mvn -B install -DskipTests --file pom.xml site: name: site (Java ${{ matrix.java }}) runs-on: ubuntu-latest