From 011c6315ea1c0dd13144ad93f5022fc09952b856 Mon Sep 17 00:00:00 2001
From: Ashley Scopes <73482956+ascopes@users.noreply.github.com>
Date: Fri, 30 Dec 2022 14:22:22 +0000
Subject: [PATCH 1/3] Closes #122 - split up unit and integration test runners
and coverage
---
.github/workflows/build.yml | 10 +-
.github/workflows/codeql.yml | 2 +-
.github/workflows/compliance.yml | 1 +
.github/workflows/deploy.yml | 1 +
.github/workflows/mutation-global.yml | 3 +-
.../acceptance-tests-avaje-inject/pom.xml | 6 +-
.../acceptance-tests-avaje-jsonb/pom.xml | 6 +-
.../acceptance-tests-checkerframework/pom.xml | 6 +-
.../acceptance-tests-dagger/pom.xml | 6 +-
.../acceptance-tests-error-prone/pom.xml | 6 +-
.../pom.xml | 6 +-
.../pom.xml | 6 +-
.../pom.xml | 6 +-
.../acceptance-tests-immutables/pom.xml | 6 +-
.../acceptance-tests-lombok/pom.xml | 6 +-
.../acceptance-tests-manifold-systems/pom.xml | 18 ++-
.../acceptance-tests-mapstruct/pom.xml | 6 +-
.../acceptance-tests-micronaut/pom.xml | 6 +-
.../pom.xml | 6 +-
.../acceptance-tests-serviceloader/pom.xml | 6 +-
.../acceptance-tests-spring/pom.xml | 6 +-
acceptance-tests/pom.xml | 19 ++++
codecov.yml | 46 +++++++-
java-compiler-testing/pom.xml | 23 +++-
...rationTest.java => DoNotMutationTest.java} | 7 +-
...BasicLegacyCompilationIntegrationTest.java | 4 +-
...BasicModuleCompilationIntegrationTest.java | 4 +-
...MultiModuleCompilationIntegrationTest.java | 4 +-
pom.xml | 105 +++++++++++++++++-
scripts/prepare-test-outputs-for-merge.sh | 20 +++-
30 files changed, 246 insertions(+), 111 deletions(-)
rename java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/helpers/{IntegrationTest.java => DoNotMutationTest.java} (86%)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index c3f243c60..811fd8cab 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -35,7 +35,8 @@ jobs:
shell: bash
run: >-
./mvnw
- -B
+ -B
+ -e
-T4
-U
-pl java-compiler-testing
@@ -98,6 +99,7 @@ jobs:
run: >-
./mvnw
-B
+ -e
-T4
-U
--no-transfer-progress
@@ -115,15 +117,17 @@ jobs:
${{ matrix.java-version }}
${{ matrix.os-name }}
- - name: Archive Surefire and Jacoco reports
+ - name: Archive test and coverage reports
uses: actions/upload-artifact@v3
if: always()
with:
name: reports-java-${{ matrix.java-version }}-${{ matrix.os-name }}
if-no-files-found: error
path: |-
+ **/target/failsafe-reports/
**/target/surefire-reports/
- **/target/site/jacoco/jacoco*.xml
+ **/target/site/jacoco/unit/jacoco*.xml
+ **/target/site/jacoco/int/jacoco*.xml
retention-days: 5
publish-test-reports:
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 9e7b1abe9..1b2c3362f 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -2,7 +2,7 @@ name: CodeQL analysis
on:
pull_request:
branches:
- - '**'
+ - 'main'
types:
- opened
- synchronize
diff --git a/.github/workflows/compliance.yml b/.github/workflows/compliance.yml
index 3d708683f..3ef54f66e 100644
--- a/.github/workflows/compliance.yml
+++ b/.github/workflows/compliance.yml
@@ -35,6 +35,7 @@ jobs:
run: >-
./mvnw
-B
+ -e
-T4
-U
--no-transfer-progress
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 1391014fa..e6dd2a675 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -51,6 +51,7 @@ jobs:
run: >-
./mvnw
-B
+ -e
-T4
-Dmaven.deploy.skip=${{ ! inputs.deploy-artifacts-to-gh-packages }}
-Dmaven.source.includePom=true
diff --git a/.github/workflows/mutation-global.yml b/.github/workflows/mutation-global.yml
index 410fcc3ef..ee99aed74 100644
--- a/.github/workflows/mutation-global.yml
+++ b/.github/workflows/mutation-global.yml
@@ -31,8 +31,9 @@ jobs:
run: >-
./mvnw
-B
+ -e
-U
- -am
+ --also-make
-pl java-compiler-testing
--no-transfer-progress
-P mutation
diff --git a/acceptance-tests/acceptance-tests-avaje-inject/pom.xml b/acceptance-tests/acceptance-tests-avaje-inject/pom.xml
index cfe188fc8..4725945b6 100644
--- a/acceptance-tests/acceptance-tests-avaje-inject/pom.xml
+++ b/acceptance-tests/acceptance-tests-avaje-inject/pom.xml
@@ -66,11 +66,7 @@
org.apache.maven.plugins
- maven-surefire-plugin
-
-
- true
-
+ maven-failsafe-plugin
diff --git a/acceptance-tests/acceptance-tests-avaje-jsonb/pom.xml b/acceptance-tests/acceptance-tests-avaje-jsonb/pom.xml
index d0c6bfc43..652490312 100644
--- a/acceptance-tests/acceptance-tests-avaje-jsonb/pom.xml
+++ b/acceptance-tests/acceptance-tests-avaje-jsonb/pom.xml
@@ -74,11 +74,7 @@
org.apache.maven.plugins
- maven-surefire-plugin
-
-
- true
-
+ maven-failsafe-plugin
diff --git a/acceptance-tests/acceptance-tests-checkerframework/pom.xml b/acceptance-tests/acceptance-tests-checkerframework/pom.xml
index 726bba2d6..0bdda2c4e 100644
--- a/acceptance-tests/acceptance-tests-checkerframework/pom.xml
+++ b/acceptance-tests/acceptance-tests-checkerframework/pom.xml
@@ -78,11 +78,7 @@
org.apache.maven.plugins
- maven-surefire-plugin
-
-
- true
-
+ maven-failsafe-plugin
diff --git a/acceptance-tests/acceptance-tests-dagger/pom.xml b/acceptance-tests/acceptance-tests-dagger/pom.xml
index 61d54824b..ebda6825a 100644
--- a/acceptance-tests/acceptance-tests-dagger/pom.xml
+++ b/acceptance-tests/acceptance-tests-dagger/pom.xml
@@ -66,11 +66,7 @@
org.apache.maven.plugins
- maven-surefire-plugin
-
-
- true
-
+ maven-failsafe-plugin
diff --git a/acceptance-tests/acceptance-tests-error-prone/pom.xml b/acceptance-tests/acceptance-tests-error-prone/pom.xml
index 89fd850cc..287d7388a 100644
--- a/acceptance-tests/acceptance-tests-error-prone/pom.xml
+++ b/acceptance-tests/acceptance-tests-error-prone/pom.xml
@@ -74,11 +74,7 @@
org.apache.maven.plugins
- maven-surefire-plugin
-
-
- true
-
+ maven-failsafe-plugin
diff --git a/acceptance-tests/acceptance-tests-google-auto-factory/pom.xml b/acceptance-tests/acceptance-tests-google-auto-factory/pom.xml
index f6f0bb64e..ff0c91e40 100644
--- a/acceptance-tests/acceptance-tests-google-auto-factory/pom.xml
+++ b/acceptance-tests/acceptance-tests-google-auto-factory/pom.xml
@@ -59,11 +59,7 @@
org.apache.maven.plugins
- maven-surefire-plugin
-
-
- true
-
+ maven-failsafe-plugin
diff --git a/acceptance-tests/acceptance-tests-google-auto-service/pom.xml b/acceptance-tests/acceptance-tests-google-auto-service/pom.xml
index a9dcc4069..6a1e6cd90 100644
--- a/acceptance-tests/acceptance-tests-google-auto-service/pom.xml
+++ b/acceptance-tests/acceptance-tests-google-auto-service/pom.xml
@@ -59,11 +59,7 @@
org.apache.maven.plugins
- maven-surefire-plugin
-
-
- true
-
+ maven-failsafe-plugin
diff --git a/acceptance-tests/acceptance-tests-google-auto-value/pom.xml b/acceptance-tests/acceptance-tests-google-auto-value/pom.xml
index 420b2fb1a..90ce29e06 100644
--- a/acceptance-tests/acceptance-tests-google-auto-value/pom.xml
+++ b/acceptance-tests/acceptance-tests-google-auto-value/pom.xml
@@ -66,11 +66,7 @@
org.apache.maven.plugins
- maven-surefire-plugin
-
-
- true
-
+ maven-failsafe-plugin
diff --git a/acceptance-tests/acceptance-tests-immutables/pom.xml b/acceptance-tests/acceptance-tests-immutables/pom.xml
index a686f5de0..d03a5b4bf 100644
--- a/acceptance-tests/acceptance-tests-immutables/pom.xml
+++ b/acceptance-tests/acceptance-tests-immutables/pom.xml
@@ -59,11 +59,7 @@
org.apache.maven.plugins
- maven-surefire-plugin
-
-
- true
-
+ maven-failsafe-plugin
diff --git a/acceptance-tests/acceptance-tests-lombok/pom.xml b/acceptance-tests/acceptance-tests-lombok/pom.xml
index 98c71df17..95ff6dd74 100644
--- a/acceptance-tests/acceptance-tests-lombok/pom.xml
+++ b/acceptance-tests/acceptance-tests-lombok/pom.xml
@@ -59,11 +59,7 @@
org.apache.maven.plugins
- maven-surefire-plugin
-
-
- true
-
+ maven-failsafe-plugin
diff --git a/acceptance-tests/acceptance-tests-manifold-systems/pom.xml b/acceptance-tests/acceptance-tests-manifold-systems/pom.xml
index dd9ec04ff..19c93775b 100644
--- a/acceptance-tests/acceptance-tests-manifold-systems/pom.xml
+++ b/acceptance-tests/acceptance-tests-manifold-systems/pom.xml
@@ -77,12 +77,20 @@
org.apache.maven.plugins
- maven-surefire-plugin
-
-
- false
-
+ maven-failsafe-plugin
+
+
+
+ ${project.artifactId}::ignore-tests-after-jdk11
+
+ (11,)
+
+
+ true
+
+
+
diff --git a/acceptance-tests/acceptance-tests-mapstruct/pom.xml b/acceptance-tests/acceptance-tests-mapstruct/pom.xml
index 4ab103df8..54f298bc1 100644
--- a/acceptance-tests/acceptance-tests-mapstruct/pom.xml
+++ b/acceptance-tests/acceptance-tests-mapstruct/pom.xml
@@ -66,11 +66,7 @@
org.apache.maven.plugins
- maven-surefire-plugin
-
-
- true
-
+ maven-failsafe-plugin
diff --git a/acceptance-tests/acceptance-tests-micronaut/pom.xml b/acceptance-tests/acceptance-tests-micronaut/pom.xml
index 4923ddb4d..e8f1759d1 100644
--- a/acceptance-tests/acceptance-tests-micronaut/pom.xml
+++ b/acceptance-tests/acceptance-tests-micronaut/pom.xml
@@ -84,11 +84,7 @@
org.apache.maven.plugins
- maven-surefire-plugin
-
-
- true
-
+ maven-failsafe-plugin
diff --git a/acceptance-tests/acceptance-tests-serviceloader-jpms/pom.xml b/acceptance-tests/acceptance-tests-serviceloader-jpms/pom.xml
index 51ef45232..e9eae87dd 100644
--- a/acceptance-tests/acceptance-tests-serviceloader-jpms/pom.xml
+++ b/acceptance-tests/acceptance-tests-serviceloader-jpms/pom.xml
@@ -48,11 +48,7 @@
org.apache.maven.plugins
- maven-surefire-plugin
-
-
- true
-
+ maven-failsafe-plugin
diff --git a/acceptance-tests/acceptance-tests-serviceloader/pom.xml b/acceptance-tests/acceptance-tests-serviceloader/pom.xml
index 8ff77c2f8..709b58c34 100644
--- a/acceptance-tests/acceptance-tests-serviceloader/pom.xml
+++ b/acceptance-tests/acceptance-tests-serviceloader/pom.xml
@@ -48,11 +48,7 @@
org.apache.maven.plugins
- maven-surefire-plugin
-
-
- true
-
+ maven-failsafe-plugin
diff --git a/acceptance-tests/acceptance-tests-spring/pom.xml b/acceptance-tests/acceptance-tests-spring/pom.xml
index 91fc09c10..c3965be44 100644
--- a/acceptance-tests/acceptance-tests-spring/pom.xml
+++ b/acceptance-tests/acceptance-tests-spring/pom.xml
@@ -97,11 +97,7 @@
org.apache.maven.plugins
- maven-surefire-plugin
-
-
- true
-
+ maven-failsafe-plugin
diff --git a/acceptance-tests/pom.xml b/acceptance-tests/pom.xml
index 207d9c4d0..efe40c8d3 100644
--- a/acceptance-tests/pom.xml
+++ b/acceptance-tests/pom.xml
@@ -67,6 +67,25 @@
true
+
+
+ org.apache.maven.plugins
+ maven-failsafe-plugin
+
+
+ *Test
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+
+ true
+
+
diff --git a/codecov.yml b/codecov.yml
index c0bc14f31..5efadba2c 100644
--- a/codecov.yml
+++ b/codecov.yml
@@ -1,8 +1,52 @@
+# General behaviour.
codecov:
max_report_age: 12
require_ci_to_pass: true
+
+# PR comment format.
+comment:
+ layout: "reach, diff, flags, files"
+ behavior: default
+ require_changes: false
+ require_base: true
+ require_head: true
+
+# Global coverage options.
coverage:
precision: 2
- # TODO: adjust this once coverage is better.
range: "10...100"
round: down
+
+# Feature flags
+flag_management:
+ default_rules:
+ carryforward: true
+ statuses:
+ - type: project
+ target: auto
+ threshold: 1%
+ - type: patch
+ target: 90%
+
+ individual_flags:
+ # Unit testing coverage
+ - name: unit
+ paths:
+ - '**/target/site/jacoco/unit/jacoco*.xml'
+ statuses:
+ - type: project
+ target: auto
+ threshold: 65%
+ - type: patch
+ target: 90%
+
+ # Integration testing coverage
+ - name: integration
+ paths:
+ - '**/target/site/jacoco/int/jacoco*.xml'
+ statuses:
+ - type: project
+ target: auto
+ threshold: 0%
+ - type: patch
+ target: 0%
diff --git a/java-compiler-testing/pom.xml b/java-compiler-testing/pom.xml
index b26ae0eb1..84b39b822 100644
--- a/java-compiler-testing/pom.xml
+++ b/java-compiler-testing/pom.xml
@@ -104,6 +104,11 @@
+
+ org.apache.maven.plugins
+ maven-failsafe-plugin
+
+
org.apache.maven.plugins
maven-javadoc-plugin
@@ -120,10 +125,6 @@
org.apache.maven.plugins
maven-surefire-plugin
-
-
- true
-
@@ -149,14 +150,24 @@
+
+ org.apache.maven.plugins
+ maven-failsafe-plugin
+
+
+
+ true
+
+
+
+
org.pitest
pitest-maven
-
- integration
+ no-mutation
diff --git a/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/helpers/IntegrationTest.java b/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/helpers/DoNotMutationTest.java
similarity index 86%
rename from java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/helpers/IntegrationTest.java
rename to java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/helpers/DoNotMutationTest.java
index 3a4ab9a82..f4aa93669 100644
--- a/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/helpers/IntegrationTest.java
+++ b/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/helpers/DoNotMutationTest.java
@@ -23,14 +23,13 @@
import org.junit.jupiter.api.Tag;
/**
- * Marks a test as an integration test. These get excluded from some places such as mutation
- * testing.
+ * Marks a test so that it will not be mutation tested.
*
* @author Ashley Scopes
*/
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.ANNOTATION_TYPE})
-@Tag("integration")
-public @interface IntegrationTest {
+@Tag("no-mutation")
+public @interface DoNotMutationTest {
}
diff --git a/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicLegacyCompilationIntegrationTest.java b/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicLegacyCompilationIntegrationTest.java
index 2d907f5bd..02de42f9a 100644
--- a/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicLegacyCompilationIntegrationTest.java
+++ b/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicLegacyCompilationIntegrationTest.java
@@ -19,7 +19,7 @@
import io.github.ascopes.jct.compilers.JctCompiler;
import io.github.ascopes.jct.junit.JavacCompilerTest;
-import io.github.ascopes.jct.tests.helpers.IntegrationTest;
+import io.github.ascopes.jct.tests.helpers.DoNotMutationTest;
import io.github.ascopes.jct.workspaces.PathStrategy;
import io.github.ascopes.jct.workspaces.Workspaces;
import javax.tools.StandardLocation;
@@ -31,7 +31,7 @@
* @author Ashley Scopes
*/
@DisplayName("Basic legacy compilation integration tests")
-@IntegrationTest
+@DoNotMutationTest
class BasicLegacyCompilationIntegrationTest {
@DisplayName("I can compile a 'Hello, World!' program using a RAM directory")
diff --git a/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicModuleCompilationIntegrationTest.java b/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicModuleCompilationIntegrationTest.java
index f41af24e5..1788f6306 100644
--- a/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicModuleCompilationIntegrationTest.java
+++ b/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicModuleCompilationIntegrationTest.java
@@ -19,7 +19,7 @@
import io.github.ascopes.jct.compilers.JctCompiler;
import io.github.ascopes.jct.junit.JavacCompilerTest;
-import io.github.ascopes.jct.tests.helpers.IntegrationTest;
+import io.github.ascopes.jct.tests.helpers.DoNotMutationTest;
import io.github.ascopes.jct.workspaces.PathStrategy;
import io.github.ascopes.jct.workspaces.Workspaces;
import org.junit.jupiter.api.DisplayName;
@@ -30,7 +30,7 @@
* @author Ashley Scopes
*/
@DisplayName("Basic module compilation integration tests")
-@IntegrationTest
+@DoNotMutationTest
class BasicModuleCompilationIntegrationTest {
@DisplayName("I can compile a 'Hello, World!' module program using a RAM disk")
diff --git a/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicMultiModuleCompilationIntegrationTest.java b/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicMultiModuleCompilationIntegrationTest.java
index f3c69bbe6..7126c1be9 100644
--- a/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicMultiModuleCompilationIntegrationTest.java
+++ b/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicMultiModuleCompilationIntegrationTest.java
@@ -19,7 +19,7 @@
import io.github.ascopes.jct.compilers.JctCompiler;
import io.github.ascopes.jct.junit.JavacCompilerTest;
-import io.github.ascopes.jct.tests.helpers.IntegrationTest;
+import io.github.ascopes.jct.tests.helpers.DoNotMutationTest;
import io.github.ascopes.jct.workspaces.PathStrategy;
import io.github.ascopes.jct.workspaces.Workspaces;
import org.junit.jupiter.api.DisplayName;
@@ -30,7 +30,7 @@
* @author Ashley Scopes
*/
@DisplayName("Basic multi-module compilation integration tests")
-@IntegrationTest
+@DoNotMutationTest
class BasicMultiModuleCompilationIntegrationTest {
@DisplayName("I can compile a single module using multi-module layout using a RAM disk")
diff --git a/pom.xml b/pom.xml
index 0ca88aa22..ce47b5485 100644
--- a/pom.xml
+++ b/pom.xml
@@ -52,7 +52,6 @@
-
1.1.2
3.23.1
@@ -73,6 +72,7 @@
3.2.0
3.10.1
3.0.0
+ 3.0.0-M7
3.1.0
3.3.0
3.4.1
@@ -229,6 +229,67 @@
+
+
+ org.apache.maven.plugins
+ maven-failsafe-plugin
+ ${maven-failsafe-plugin.version}
+
+
+
+ *IntegrationTest
+
+
+ true
+ random
+ true
+
+
+
+ false
+ 3.0
+ false
+ true
+ true
+ true
+
+
+ ${hide-test-logs-in-console}
+
+
+ false
+ false
+ true
+ true
+
+
+
+
+
+ me.fabriciorby
+ maven-surefire-junit5-tree-reporter
+ ${maven-surefire-junit5-tree-reporter.version}
+
+
+
+
+
+
+ integration-test
+
+
+ integration-test
+ verify
+
+
+
+
+
org.apache.maven.plugins
maven-install-plugin
@@ -303,11 +364,18 @@
${maven-surefire-plugin.version}
+
+ *IntegrationTest
+
+
+ true
+ random
+ true
+
- random
false
@@ -369,14 +437,45 @@
prepare-agent
+
+
+ ${project.build.directory}/jacoco-unit.bin
+
- report-coverage
+ report-unit-test-coverage
test
report
+
+ ${project.build.directory}/jacoco-unit.bin
+ ${project.build.directory}/site/jacoco/unit
+
+
+
+
+ add-coverage-agent-to-failsafe-args
+ pre-integration-test
+
+ prepare-agent-integration
+
+
+ ${project.build.directory}/jacoco-int.bin
+
+
+
+
+ report-integration-test-coverage
+ post-integration-test
+
+ report-integration
+
+
+ ${project.build.directory}/jacoco-int.bin
+ ${project.build.directory}/site/jacoco/int
+
diff --git a/scripts/prepare-test-outputs-for-merge.sh b/scripts/prepare-test-outputs-for-merge.sh
index d577f77d4..3d607ba43 100755
--- a/scripts/prepare-test-outputs-for-merge.sh
+++ b/scripts/prepare-test-outputs-for-merge.sh
@@ -117,17 +117,25 @@ function find-all-surefire-reports {
find . -wholename '**/target/surefire-reports/TEST-*Test.xml' -print0 | xargs -0
}
+function find-all-failsafe-reports {
+ info "Discovering Failsafe test reports"
+ find . -wholename '**/target/failsafe-reports/TEST-*Test.xml' -print0 | xargs -0
+}
+
function find-all-jacoco-reports {
info "Discovering JaCoCo coverage reports"
- # For now, we only want the one jacoco file for the main module, if it exists.
- local desired_jacoco_file="java-compiler-testing/target/site/jacoco/jacoco.xml"
- if [ -f "${desired_jacoco_file}" ]; then
- echo "${desired_jacoco_file}"
+ local desired_jacoco_unit_file="java-compiler-testing/target/site/jacoco/unit/jacoco.xml"
+ if [ -f "${desired_jacoco_unit_file}" ]; then
+ echo "${desired_jacoco_unit_file}"
+ fi
+ local desired_jacoco_int_file="java-compiler-testing/target/site/jacoco/int/jacoco.xml"
+ if [ -f "${desired_jacoco_int_file}" ]; then
+ echo "${desired_jacoco_int_file}"
fi
}
-stage "Updating Surefire reports..."
-for surefire_report in $(find-all-surefire-reports); do
+stage "Updating test reports..."
+for surefire_report in $(find-all-surefire-reports) $(find-all-failsafe-reports); do
info "Adding Java version to test case names in ${surefire_report}..."
new_surefire_report=${surefire_report/.xml/-java-${ci_java_version}-${ci_os}.xml}
xsltproc --stringparam prefix "[Java-${ci_java_version}-${ci_os}]" \
From 692b852b952e15faf6e3c24cac67f2abeff97100 Mon Sep 17 00:00:00 2001
From: Ashley Scopes <73482956+ascopes@users.noreply.github.com>
Date: Fri, 30 Dec 2022 14:25:30 +0000
Subject: [PATCH 2/3] Use unicode test reporter rather than ASCII one
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index ce47b5485..c98b6ed28 100644
--- a/pom.xml
+++ b/pom.xml
@@ -261,7 +261,7 @@
${hide-test-logs-in-console}
+ implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5StatelessTestsetInfoTreeReporterUnicode">
false
false
true
@@ -389,7 +389,7 @@
${hide-test-logs-in-console}
+ implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5StatelessTestsetInfoTreeReporterUnicode">
false
false
true
From 05c366b6188c69478148e9bda5cbbfa1545169d9 Mon Sep 17 00:00:00 2001
From: Ashley Scopes <73482956+ascopes@users.noreply.github.com>
Date: Fri, 30 Dec 2022 14:30:08 +0000
Subject: [PATCH 3/3] Use codecov GitHub action
---
.github/workflows/build.yml | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 811fd8cab..c2a536f74 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -156,17 +156,10 @@ jobs:
- name: Publish to codecov
continue-on-error: true
if: always()
- shell: bash
- run: |-
- curl --fail https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring \
- --keyring trustedkeys.gpg --import
- curl --fail -Os https://uploader.codecov.io/latest/linux/codecov
- curl --fail -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
- curl --fail -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
- gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
- shasum -a 256 -c codecov.SHA256SUM
- chmod -v +x codecov
- ./codecov
+ uses: codecov/codecov-action@v3
+ with:
+ fail_ci_if_error: true
+ verbose: true
- name: Publish unit test results
uses: EnricoMi/publish-unit-test-result-action@v2