Skip to content

Commit

Permalink
Change directory of failsafe and surefire reports when not on GitHub …
Browse files Browse the repository at this point in the history
…actions (#1478)

Co-authored-by: Ryan Baxter <[email protected]>
  • Loading branch information
Ryan Baxter and ryanjbaxter authored Oct 12, 2023
1 parent cfec390 commit fe8fa86
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
9 changes: 5 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -208,15 +209,15 @@
<includes>
<include>${testsToRun}</include>
</includes>
<reportsDirectory>${project.build.directory}/surefire-reports/${CURRENT_INSTANCE}</reportsDirectory>
<reportsDirectory>${project.build.directory}/${surefire-reports-directory}</reportsDirectory>
</configuration>
</plugin>

<plugin>
<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>

Expand Down

0 comments on commit fe8fa86

Please sign in to comment.