8000 GH Actions -> archive surefire reports (#21913). by lhanusov · Pull Request #21875 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/actions/surefire-reports/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Archive Surefire reports
description: It will upload and archive surefire reports per particular test run.
inputs:
branches-ref:
description: 'The name of the branches reference it should run against.'
required: false
default: ${{ env.RELEASE_BRANCHES }}
testrun-name:
description: 'The name of the particular test run.'
required: true
reports-path:
description: 'The path from where to get the surefire reports.'
required: true
keep-days:
description: 'For how many days to store the particular artifact.'
required: false
default: 1

runs:
using: composite
steps:
- uses: actions/upload-artifact@v3
if: ${{ !cancelled() && contains(fromJSON('${{ inputs.branches-ref }}'), github.ref) && contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name) }}
with:
name: ${{ inputs.testrun-name }}
path: ${{ inputs.reports-path }}
retention-days: ${{ inputs.keep-days }}
97 changes: 97 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ env:
DEFAULT_JDK_VERSION: 17
DEFAULT_JDK_DIST: temurin
SUREFIRE_RERUN_FAILING_COUNT: 2
RELEASE_BRANCHES: |
refs/heads/release/22.0

concurrency:
# Only cancel jobs for PR updates
Expand Down Expand Up @@ -74,6 +76,15 @@ jobs:
if: always()
uses: ./.github/actions/upload-heapdumps

- name: Surefire reports
uses: ./.github/actions/surefire-reports
with:
testrun-name: surefire-unit-tests
reports-path: |
**/target/surefire-reports/TEST*.xml
**/**/target/surefire-reports/TEST*.xml
**/**/**/target/surefire-reports/TEST*.xml

base-integration-tests:
name: Base IT
needs: build
Expand Down Expand Up @@ -107,6 +118,12 @@ jobs:
with:
job-name: Base IT

- name: Surefire reports
uses: ./.github/actions/surefire-reports
with:
testrun-name: surefire-base-tests-${{ matrix.group }}
reports-path: testsuite/integration-arquillian/tests/base/target/surefire-reports/TEST*.xml

quarkus-integration-tests:
name: Quarkus IT
needs: build
Expand Down Expand Up @@ -149,6 +166,12 @@ jobs:
if: always()
uses: ./.github/actions/upload-heapdumps

- name: Surefire reports
uses: ./.github/actions/surefire-reports
with:
testrun-name: surefire-quarkus-tests-${{ matrix.os }}-${{ matrix.server }}
reports-path: quarkus/tests/integration/target/surefire-reports/TEST*.xml

jdk-integration-tests:
name: Java Distribution IT
needs: build
Expand Down Expand Up @@ -194,6 +217,12 @@ jobs:
with:
job-name: Java Distribution IT

- name: Surefire reports
uses: ./.github/actions/surefire-reports
with:
testrun-name: surefire-jdk-tests-${{ matrix.os }}-${{ matrix.dist }}-${{ matrix.version }}
reports-path: testsuite/integration-arquillian/tests/base/target/surefire-reports/TEST*.xml

databases-new-store:
name: Databases New Store
runs-on: ubuntu-latest
Expand Down Expand Up @@ -250,6 +279,12 @@ jobs:
with:
job-name: New Store IT

- name: Surefire reports
uses: ./.github/actions/surefire-reports
with:
testrun-name: surefire-new-store-tests-${{ matrix.db }}
reports-path: testsuite/integration-arquillian/tests/base/target/surefire-reports/TEST*.xml

legacy-store-integration-tests:
name: Legacy Store IT
needs: build
Expand Down Expand Up @@ -283,6 +318,12 @@ jobs:
with:
job-name: Legacy Store IT

- name: Surefire reports
uses: ./.github/actions/surefire-reports
with:
testrun-name: surefire-legacy-store-tests-${{ matrix.db }}
reports-path: testsuite/integration-arquillian/tests/base/target/surefire-reports/TEST*.xml

store-model-tests:
name: Store Model Tests
runs-on: ubuntu-latest
Expand All @@ -309,6 +350,12 @@ jobs:
with:
job-name: Store Model Tests

- name: Surefire reports
uses: ./.github/actions/surefire-reports
with:
testrun-name: surefire-model-tests
reports-path: testsuite/model/target/surefire-reports*/TEST*.xml

clustering-integration-tests:
name: Legacy Clustering IT
needs: build
Expand Down Expand Up @@ -338,6 +385,12 @@ jobs:
with:
job-name: Legacy Clustering IT

- name: Surefire reports
uses: ./.github/actions/surefire-reports
with:
testrun-name: surefire-cluster-tests
reports-path: testsuite/integration-arquillian/tests/base/target/surefire-reports/TEST*.xml

fips-unit-tests:
name: FIPS UT
runs-on: ubuntu-latest
Expand Down Expand Up @@ -365,6 +418,14 @@ jobs:
if: always()
uses: ./.github/actions/upload-heapdumps

- name: Surefire reports
uses: ./.github/actions/surefire-reports
with:
testrun-name: surefire-fips-unit-tests
reports-path: |
crypto/default/target/surefire-reports/TEST*.xml
crypto/fips1402/target/surefire-reports/TEST*.xml

fips-integration-tests:
name: FIPS IT
needs: build
10BC8 Expand Down Expand Up @@ -406,6 +467,12 @@ jobs:
with:
job-name: FIPS IT

- name: Surefire reports
uses: ./.github/actions/surefire-reports
with:
testrun-name: surefire-fips-tests-${{ matrix.mode }}
reports-path: testsuite/integration-arquillian/tests/base/target/surefire-reports/TEST*.xml

account-console-integration-tests:
name: Account Console IT
runs-on: ubuntu-latest
Expand Down Expand Up @@ -436,6 +503,12 @@ jobs:
with:
job-name: Account Console IT

- name: Surefire reports
uses: ./.github/actions/surefire-reports
with:
testrun-name: surefire-account-tests-${{ matrix.browser }}
reports-path: testsuite/integration-arquillian/tests/other/base-ui/target/surefire-reports/TEST*.xml

forms-integration-tests:
name: Forms IT
runs-on: ubuntu-latest
Expand Down Expand Up @@ -469,6 +542,12 @@ jobs:
with:
job-name: Forms IT

- name: Surefire reports
uses: ./.github/actions/surefire-reports
with:
testrun-name: surefire-forms-tests-${{ matrix.browser }}
reports-path: testsuite/integration-arquillian/tests/base/target/surefire-reports/TEST*.xml

webauthn-integration-tests:
name: WebAuthn IT
runs-on: ubuntu-latest
Expand Down Expand Up @@ -499,6 +578,12 @@ jobs:
with:
job-name: WebAuthn IT

- name: Surefire reports
uses: ./.github/actions/surefire-reports
with:
testrun-name: surefire-webauthn-tests-${{ matrix.browser }}
reports-path: testsuite/integration-arquillian/tests/other/webauthn/target/surefire-reports/TEST*.xml

sssd-unit-tests:
name: SSSD
runs-on: ubuntu-latest
Expand Down Expand Up @@ -534,6 +619,12 @@ jobs:
if: ${{ needs.conditional.outputs.sssd == 'true' }}
run: .github/scripts/run-ipa.sh "${{ github.workspace }}"

- name: Surefire reports
uses: ./.github/actions/surefire-reports
with:
testrun-name: surefire-sssd-tests
reports-path: testsuite/integration-arquillian/tests/other/sssd/target/surefire-reports/TEST*.xml

migration-tests:
name: Migration Tests
runs-on: ubuntu-latest
Expand Down Expand Up @@ -574,6 +665,12 @@ jobs:
with:
job-name: Migration Tests

- name: Surefire reports
uses: ./.github/actions/surefire-reports
with:
testrun-name: surefire-migration-tests-${{ matrix.old-version }}-${{ matrix.database }}
reports-path: testsuite/integration-arquillian/tests/base/target/surefire-reports/TEST*.xml

check-set-status:
name: Set check conclusion
needs:
Expand Down
0