Skip to content

Commit

Permalink
Add mikepenz/action-junit-report (#7894)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
eddumelendez committed Nov 28, 2023
1 parent 1a3b233 commit 101b6a7
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/actions/setup-junit-report/action.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions .github/workflows/ci-rootless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ permissions:
jobs:
test:
runs-on: ubuntu-22.04
permissions:
checks: write
steps:
- uses: actions/checkout@v4
- name: Setup rootless Docker
Expand All @@ -53,3 +55,4 @@ jobs:
uses: gradle/gradle-build-action@v2
- name: Build with Gradle
run: ./gradlew --no-daemon --scan testcontainers:test --tests '*GenericContainerRuleTest'
- uses: ./.github/actions/setup-junit-report
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,21 @@ env:
jobs:
core:
runs-on: ubuntu-22.04
permissions:
checks: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-build
- name: Build and test with Gradle
run: |
./gradlew :testcontainers:check --no-daemon --continue --scan
- uses: ./.github/actions/setup-junit-report

turbo-mode:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-22.04
permissions:
checks: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-build
Expand All @@ -71,6 +76,7 @@ jobs:
working-directory: ./smoke-test/
run: |
./gradlew check --no-daemon --continue --scan --info
- uses: ./.github/actions/setup-junit-report

find_gradle_jobs:
needs: [core]
Expand All @@ -97,12 +103,15 @@ jobs:
fail-fast: false
matrix: ${{ fromJson(needs.find_gradle_jobs.outputs.matrix) }}
runs-on: ubuntu-22.04
permissions:
checks: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-build
- name: Build and test with Gradle (${{matrix.gradle_args}})
run: |
./gradlew --no-daemon --continue --scan ${{matrix.gradle_args}}
- uses: ./.github/actions/setup-junit-report

find_examples_jobs:
needs: [check]
Expand Down Expand Up @@ -130,13 +139,16 @@ jobs:
fail-fast: false
matrix: ${{ fromJson(needs.find_examples_jobs.outputs.matrix) }}
runs-on: ubuntu-22.04
permissions:
checks: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-build
- name: Build and test Examples with Gradle (${{matrix.gradle_args}})
working-directory: ./examples/
run: |
./gradlew --no-daemon --continue --scan --info ${{matrix.gradle_args}}
- uses: ./.github/actions/setup-junit-report

find_docs_examples_jobs:
needs: [check_examples]
Expand All @@ -163,9 +175,12 @@ jobs:
fail-fast: false
matrix: ${{ fromJson(needs.find_docs_examples_jobs.outputs.matrix) }}
runs-on: ubuntu-22.04
permissions:
checks: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-build
- name: Build and test with Gradle (${{matrix.gradle_args}})
run: |
./gradlew --no-daemon --continue --scan ${{matrix.gradle_args}}
- uses: ./.github/actions/setup-junit-report

0 comments on commit 101b6a7

Please sign in to comment.