From 568700668ec615e04b332fa3b659c96db401c7c2 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sat, 19 Oct 2024 16:22:12 +0100 Subject: [PATCH] Update build.yml --- .github/workflows/build.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a898c3bc..9a3e5f30 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,12 +36,22 @@ jobs: gradle-version: 8.7 - name: Build with Gradle + run: ./gradlew build --no-build-cache + continue-on-error: true + + - name: Upload JUnit test results + if: always() + uses: actions/upload-artifact@v3 + with: + name: junit-test-results + path: '**/build/test-results/test/TEST-*.xml' + retention-days: 7 + + - name: Check for test failures + if: failure() run: | - if ! ./gradlew build --no-build-cache; then - echo "Gradle build failed. Printing test report:" - cat build/reports/tests/test/index.html - exit 1 - fi + echo "Tests failed. Please check the JUnit test results artifact for details." + exit 1 docker-compose-tests: # if: github.event_name == 'push' && github.ref == 'refs/heads/main' ||