Change directory of failsafe and surefire reports when not on GitHub actions (#1478)

Co-authored-by: Ryan Baxter <524254+ryanjbaxter@users.noreply.github.com>
This commit is contained in:
Ryan Baxter
2023-10-12 11:52:49 -04:00
committed by GitHub
parent cfec3904e2
commit fe8fa86b61
2 changed files with 7 additions and 5 deletions

View File

@@ -149,7 +149,8 @@ runs:
./mvnw -s .settings.xml \
-DtestsToRun=${tests_to_run_in_current_index} \
-DCURRENT_INSTANCE=${CURRENT_INDEX} \
-Dsurefire-reports-directory=surefire-reports/${CURRENT_INDEX} \
-Dfailsafe-reports-directory=failsafe-reports/${CURRENT_INDEX} \
-e clean install \
-P sonar -nsu --batch-mode \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \

View File

@@ -65,8 +65,9 @@
<!-- in our github actions run, we save surefire/failsafe reports in a path that looks like this: -->
<!-- surefire-report/1/... , where "1" (and other numbers like this) are the index of the github matrix -->
<!-- where this is running. When outside the github actions, for example locally/jenkins, we will simply store -->
<!-- the reports in a directory: "surefire-reports/one/..." -->
<CURRENT_INSTANCE>one</CURRENT_INSTANCE>
<!-- the reports in a directory: "surefire-reports/..." -->
<surefire-reports-directory>surefire-reports</surefire-reports-directory>
<failsafe-reports-directory>failsafe-reports</failsafe-reports-directory>
<!-- Dependency Versions -->
<mockito-inline.version>4.8.1</mockito-inline.version>
<spring-cloud-commons.version>4.0.5-SNAPSHOT</spring-cloud-commons.version>
@@ -208,7 +209,7 @@
<includes>
<include>${testsToRun}</include>
</includes>
<reportsDirectory>${project.build.directory}/surefire-reports/${CURRENT_INSTANCE}</reportsDirectory>
<reportsDirectory>${project.build.directory}/${surefire-reports-directory}</reportsDirectory>
</configuration>
</plugin>
@@ -216,7 +217,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<reportsDirectory>${project.build.directory}/failsafe-reports/${CURRENT_INSTANCE}</reportsDirectory>
<reportsDirectory>${project.build.directory}/${failsafe-reports-directory}</reportsDirectory>
</configuration>
</plugin>