From c5254d043e3fd5567924b08aff3c4be4be1b5548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Tue, 28 Nov 2023 14:14:52 -0600 Subject: [PATCH] Add mikepenz/action-junit-report Annotations with stacktraces is a nice feature to have in our own pipeline. The `mikepenz/action-junit-report` has been added as a custom action and reused in the workflow. --- .github/actions/setup-junit-report/action.yml | 11 +++++++++++ .github/workflows/ci-rootless.yml | 1 + .github/workflows/ci.yml | 5 +++++ 3 files changed, 17 insertions(+) create mode 100644 .github/actions/setup-junit-report/action.yml diff --git a/.github/actions/setup-junit-report/action.yml b/.github/actions/setup-junit-report/action.yml new file mode 100644 index 00000000000..4256799754c --- /dev/null +++ b/.github/actions/setup-junit-report/action.yml @@ -0,0 +1,11 @@ +name: Set up JUnit Report +description: Sets up JUnit Report +runs: + using: "composite" + steps: + - name: Publish Test Report + uses: mikepenz/action-junit-report@v3 + if: always() # always run even if the previous step fails + with: + report_paths: '**/build/test-results/test/TEST-*.xml' + detailed_summary: true diff --git a/.github/workflows/ci-rootless.yml b/.github/workflows/ci-rootless.yml index f2ff80a2ca8..0ab36767af0 100644 --- a/.github/workflows/ci-rootless.yml +++ b/.github/workflows/ci-rootless.yml @@ -53,3 +53,4 @@ jobs: uses: gradle/gradle-build-action@v2 - name: Build with Gradle run: ./gradlew --no-daemon --scan testcontainers:test --tests '*GenericContainerRuleTest' + - uses: ./.github/action/setup-junit-report diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 25766d668fb..450673fa33a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,6 +55,7 @@ jobs: - name: Build and test with Gradle run: | ./gradlew :testcontainers:check --no-daemon --continue --scan + - uses: ./.github/action/setup-junit-report turbo-mode: if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} @@ -71,6 +72,7 @@ jobs: working-directory: ./smoke-test/ run: | ./gradlew check --no-daemon --continue --scan --info + - uses: ./.github/action/setup-junit-report find_gradle_jobs: needs: [core] @@ -103,6 +105,7 @@ jobs: - name: Build and test with Gradle (${{matrix.gradle_args}}) run: | ./gradlew --no-daemon --continue --scan ${{matrix.gradle_args}} + - uses: ./.github/action/setup-junit-report find_examples_jobs: needs: [check] @@ -137,6 +140,7 @@ jobs: working-directory: ./examples/ run: | ./gradlew --no-daemon --continue --scan --info ${{matrix.gradle_args}} + - uses: ./.github/action/setup-junit-report find_docs_examples_jobs: needs: [check_examples] @@ -169,3 +173,4 @@ jobs: - name: Build and test with Gradle (${{matrix.gradle_args}}) run: | ./gradlew --no-daemon --continue --scan ${{matrix.gradle_args}} + - uses: ./.github/action/setup-junit-report