Upload test logs on build failure main
authorChristopher Tubbs <ctubbsii@apache.org>
Tue, 13 Oct 2020 02:02:43 +0000 (22:02 -0400)
committerChristopher Tubbs <ctubbsii@apache.org>
Tue, 13 Oct 2020 02:02:43 +0000 (22:02 -0400)
.github/workflows/maven.yaml

index 91530bf4ab13145a2fc5aad52d3e788682e22499..7db021ca0c7428c146601da166be671ac3d30858 100644 (file)
@@ -56,18 +56,21 @@ jobs:
       env:
         MAVEN_OPTS: -Djansi.force=true
     - name: Upload unit test results
       env:
         MAVEN_OPTS: -Djansi.force=true
     - name: Upload unit test results
+      if: ${{ failure() }}
       uses: actions/upload-artifact@v2
       with:
         name: surefire-reports-${{ matrix.profile.name }}
         path: ./**/target/surefire-reports/
         if-no-files-found: ignore
     - name: Upload integration test results
       uses: actions/upload-artifact@v2
       with:
         name: surefire-reports-${{ matrix.profile.name }}
         path: ./**/target/surefire-reports/
         if-no-files-found: ignore
     - name: Upload integration test results
+      if: ${{ failure() }}
       uses: actions/upload-artifact@v2
       with:
         name: failsafe-reports-${{ matrix.profile.name }}
         path: ./**/target/failsafe-reports/
         if-no-files-found: ignore
     - name: Upload mini test logs
       uses: actions/upload-artifact@v2
       with:
         name: failsafe-reports-${{ matrix.profile.name }}
         path: ./**/target/failsafe-reports/
         if-no-files-found: ignore
     - name: Upload mini test logs
+      if: ${{ failure() }}
       uses: actions/upload-artifact@v2
       with:
         name: mini-tests-logs-${{ matrix.profile.name }}
       uses: actions/upload-artifact@v2
       with:
         name: mini-tests-logs-${{ matrix.profile.name }}