Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
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
46 changes: 46 additions & 0 deletions .github/actions/archive-surefire-reports/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Archive Surefire reports
description: It will upload and archive surefire reports per particular test run.
inputs:
job-id:
description: 'Id of the particular job run.'
required: true
release-branches:
description: 'List of all related release branches (in JSON format)'
required: false
default: '["refs/heads/release/22.0"]'
keep-days:
description: 'For how many days to store the particular artifact.'
required: false
default: 1

runs:
using: composite
steps:
- id: find-surefire-reports-linux
name: Find Surefire reports directories
if: runner.os == 'Linux'
shell: bash
run: |
echo "dirs<<EOF" >> $GITHUB_OUTPUT
echo "$(find ~+ -type d -not -empty -name surefire-reports*)" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- id: find-surefire-reports-win
name: Find Surefire reports directories
if: runner.os == 'Windows'
shell: bash
run: |
echo "dirs<<EOF" >> $GITHUB_OUTPUT
echo "$(find ~+ -type d -not -empty -name surefire-reports* | sed 's@/d@D:@')" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- id: upload-surefire-linux
name: Upload Surefire reports
if: (!cancelled() && contains(fromJSON(inputs.release-branches), github.ref) && contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name))
uses: actions/upload-artifact@v3
with:
name: surefire-${{ inputs.job-id }}
path: |
${{ steps.find-surefire-reports-linux.outputs.dirs }}
${{ steps.find-surefire-reports-win.outputs.dirs }}
retention-days: ${{ inputs.keep-days }}
101 changes: 101 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ jobs:
if: always()
uses: ./.github/actions/upload-heapdumps

- name: Surefire reports
uses: ./.github/actions/archive-surefire-reports
with:
job-id: unit-tests

base-integration-tests:
name: Base IT
needs: build
Expand Down Expand Up @@ -110,6 +115,37 @@ jobs:
with:
job-name: Base IT

- name: Surefire reports
uses: ./.github/actions/archive-surefire-reports
with:
job-id: base-integration-tests-${{ matrix.group }}

quarkus-unit-tests:
name: Quarkus UT
needs: build
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

# We want to download Keycloak artifacts
- id: integration-test-setup
name: Integration test setup
uses: ./.github/actions/integration-test-setup

- name: Run unit tests
run: |
./mvnw test -f quarkus/pom.xml -pl '!tests,!tests/junit5,!tests/integration,!dist'

- name: Upload JVM Heapdumps
if: always()
uses: ./.github/actions/upload-heapdumps

- name: Surefire reports
uses: ./.github/actions/archive-surefire-reports
with:
job-id: quarkus-unit-tests

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

- name: Surefire reports
uses: ./.github/actions/archive-surefire-reports
with:
job-id: quarkus-integration-tests-${{ matrix.os }}-${{ matrix.server }}

jdk-integration-tests:
name: Java Distribution IT
needs: build
Expand Down Expand Up @@ -187,6 +228,11 @@ jobs:
with:
job-name: Java Distribution IT

- name: Surefire reports
uses: ./.github/actions/archive-surefire-reports
with:
job-id: jdk-integration-tests-${{ matrix.os }}-${{ matrix.dist }}-${{ matrix.version }}

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

- name: Surefire reports
uses: ./.github/actions/archive-surefire-reports
with:
job-id: new-store-integration-tests-${{ matrix.db }}

legacy-store-integration-tests:
name: Legacy Store IT
needs: build
Expand Down Expand Up @@ -276,6 +327,11 @@ jobs:
with:
job-name: Legacy Store IT

- name: Surefire reports
uses: ./.github/actions/archive-surefire-reports
with:
job-id: legacy-store-integration-tests-${{ matrix.db }}

store-model-tests:
name: Store Model Tests
runs-on: ubuntu-latest
Expand All @@ -302,6 +358,11 @@ jobs:
with:
job-name: Store Model Tests

- name: Surefire reports
uses: ./.github/actions/archive-surefire-reports
with:
job-id: store-model-tests

clustering-integration-tests:
name: Legacy Clustering IT
needs: build
Expand Down Expand Up @@ -331,6 +392,11 @@ jobs:
with:
job-name: Legacy Clustering IT

- name: Surefire reports
uses: ./.github/actions/archive-surefire-reports
with:
job-id: clustering-integration-tests

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

- name: Surefire reports
uses: ./.github/actions/archive-surefire-reports
with:
job-id: fips-unit-tests

fips-integration-tests:
name: FIPS IT
needs: build
Expand Down Expand Up @@ -399,6 +470,11 @@ jobs:
with:
job-name: FIPS IT

- name: Surefire reports
uses: ./.github/actions/archive-surefire-reports
with:
job-id: fips-integration-tests-${{ matrix.mode }}

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

- name: Surefire reports
uses: ./.github/actions/archive-surefire-reports
with:
job-id: account-console-integration-tests-${{ matrix.browser }}

forms-integration-tests:
name: Forms IT
runs-on: ubuntu-latest
Expand Down Expand Up @@ -462,6 +543,11 @@ jobs:
with:
job-name: Forms IT

- name: Surefire reports
uses: ./.github/actions/archive-surefire-reports
with:
job-id: forms-integration-tests-${{ matrix.browser }}

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

- name: Surefire reports
uses: ./.github/actions/archive-surefire-reports
with:
job-id: webauthn-integration-tests-${{ matrix.browser }}

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

- name: Surefire reports
uses: ./.github/actions/archive-surefire-reports
with:
job-id: sssd-unit-tests

migration-tests:
name: Migration Tests
runs-on: ubuntu-latest
Expand Down Expand Up @@ -566,6 +662,11 @@ jobs:
GH_TOKEN: ${{ github.token }}
with:
job-name: Migration Tests

- name: Surefire reports
uses: ./.github/actions/archive-surefire-reports
with:
job-id: migration-tests-${{ matrix.old-version }}-${{ matrix.database }}

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