File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 3939 mvn $MVN_ARGS
4040
4141 - name : " Run tests"
42+ id : run_tests
4243 run : |
4344 MVN_ARGS="${{ env.MVN_MULTI_THREADED_ARGS }} surefire:test -pl :spring-app -DskipTests=false"
44- mvn $MVN_ARGS "-Daicore.landscape=${{ matrix.environment }}"
45+ mvn $MVN_ARGS "-Daicore.landscape=${{ matrix.environment }}" | tee mvn_output.log # tee writes to both the console and a file
46+
47+ awk '/Results:/, /----/' mvn_output.log > test_error.log || true # true ensures the step doesn't fail if no match is found.
48+ ERROR_MSG=$(cat test_error.log | tail +4 | head -n -4 | sed ':a;N;$!ba;s/\n/\\n/g') # Slack formatting
49+ echo "error_message=$ERROR_MSG" >> $GITHUB_OUTPUT
4550 env :
4651 # See "End-to-end test application instructions" on the README.md to update the secret
4752 AICORE_SERVICE_KEY : ${{ secrets[matrix.secret-name] }}
7580 webhook-type : incoming-webhook
7681 payload : |
7782 {
78- "text": "⚠️ End-to-end tests failed! 😬 Please inspect & fix by clicking <https://github.com/SAP/ai-sdk-java/actions/runs/${{ github.run_id }}|here>"
83+ "text": "⚠️ End-to-end tests failed! 😬 Please inspect & fix by clicking <https://github.com/SAP/ai-sdk-java/actions/runs/${{ github.run_id }}|here>\n\n*Test Errors:*\n${{ steps.run_tests.outputs.error_message }} "
7984 }
8085
You can’t perform that action at this time.
0 commit comments