ARTEMIS-4832: direct test output to file, make results more visible

Archive test logs upon GHA CI job failure to allow inspection.

Output to console can be enabled on request with e.g:
  mvn test -Dmaven.test.redirectTestOutputToFile=false
This commit is contained in:
Robbie Gemmell 2024-06-21 14:05:06 +01:00 committed by clebertsuconic
parent 925e338874
commit 68155867b6
2 changed files with 9 additions and 1 deletions

View File

@ -64,6 +64,14 @@ jobs:
rm -rf ~/.m2/repository/org/apache/activemq/examples
if [ -d ~/.m2/repository/org/apache/activemq ]; then find ~/.m2/repository/org/apache/activemq -name "*-SNAPSHOT" -type d -prune -exec rm -r '{}' \; ; fi
- name: Archive Test Logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: surefire-reports-jdk-${{ matrix.java }}
path: activemq-artemis/**/target/surefire-reports/*
retention-days: 10
checks:
name: Checks (${{ matrix.java }})
runs-on: ubuntu-22.04

View File

@ -220,7 +220,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.test.failure.ignore>false</maven.test.failure.ignore>
<maven.test.redirectTestOutputToFile>false</maven.test.redirectTestOutputToFile>
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
<!--