2020-05-14 13:49:00 +00:00
|
|
|
name: Keycloak CI
|
|
|
|
|
2022-03-29 13:10:20 +00:00
|
|
|
on:
|
|
|
|
push:
|
2022-12-14 15:12:23 +00:00
|
|
|
branches-ignore:
|
|
|
|
- main
|
|
|
|
- dependabot/**
|
|
|
|
pull_request:
|
2022-03-29 13:10:20 +00:00
|
|
|
schedule:
|
2023-01-02 08:12:15 +00:00
|
|
|
- cron: 0 20,23,2,5 * * *
|
2022-09-12 09:19:23 +00:00
|
|
|
workflow_dispatch:
|
2020-05-14 13:49:00 +00:00
|
|
|
|
2021-08-04 15:04:26 +00:00
|
|
|
env:
|
|
|
|
DEFAULT_JDK_VERSION: 11
|
2022-12-14 15:12:23 +00:00
|
|
|
DEFAULT_JDK_DIST: temurin
|
2022-12-16 12:02:05 +00:00
|
|
|
SUREFIRE_RERUN_FAILING_COUNT: 2
|
2021-08-04 15:04:26 +00:00
|
|
|
|
2021-11-29 12:28:04 +00:00
|
|
|
concurrency:
|
2022-12-14 15:12:23 +00:00
|
|
|
# Only cancel jobs for PR updates
|
|
|
|
group: ci-${{ github.head_ref || github.run_id }}
|
2021-11-29 12:28:04 +00:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
|
2020-05-14 13:49:00 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build
|
2022-12-14 15:12:23 +00:00
|
|
|
if: github.event_name != 'schedule' || github.repository == 'keycloak/keycloak'
|
2020-05-14 13:49:00 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-28 15:51:51 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-11-05 14:35:47 +00:00
|
|
|
|
|
|
|
- name: Build Keycloak
|
2022-12-14 15:12:23 +00:00
|
|
|
uses: ./.github/actions/build-keycloak
|
2020-11-05 14:35:47 +00:00
|
|
|
|
2020-11-04 06:57:19 +00:00
|
|
|
unit-tests:
|
2022-12-14 15:12:23 +00:00
|
|
|
name: Base UT
|
2020-11-04 06:57:19 +00:00
|
|
|
runs-on: ubuntu-latest
|
2020-11-05 09:23:15 +00:00
|
|
|
needs: build
|
2022-11-04 07:37:24 +00:00
|
|
|
timeout-minutes: 30
|
2020-11-04 06:57:19 +00:00
|
|
|
steps:
|
2022-03-28 15:51:51 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-12-14 15:12:23 +00:00
|
|
|
|
|
|
|
- id: unit-test-setup
|
|
|
|
name: Unit test setup
|
|
|
|
uses: ./.github/actions/unit-test-setup
|
|
|
|
|
2020-11-04 06:57:19 +00:00
|
|
|
- name: Run unit tests
|
2022-12-16 14:31:28 +00:00
|
|
|
run: |
|
|
|
|
SEP=""
|
|
|
|
PROJECTS=""
|
|
|
|
for i in `find -name '*Test.java' -type f | egrep -v './(testsuite|quarkus)/' | sed 's|/src/test/java/.*||' | sort | uniq | sed 's|./||'`; do
|
|
|
|
PROJECTS="$PROJECTS$SEP$i"
|
|
|
|
SEP=","
|
|
|
|
done
|
2022-12-21 07:15:38 +00:00
|
|
|
|
2022-12-16 14:31:28 +00:00
|
|
|
./mvnw test -nsu -B -pl "$PROJECTS" -am
|
2020-11-04 06:57:19 +00:00
|
|
|
|
2022-12-15 09:14:30 +00:00
|
|
|
- name: Upload JVM Heapdumps
|
|
|
|
if: always()
|
|
|
|
uses: ./.github/actions/upload-heapdumps
|
|
|
|
|
2022-12-15 13:22:20 +00:00
|
|
|
- id: upload-surefire-reports
|
|
|
|
name: Upload Surefire reports
|
|
|
|
uses: ./.github/actions/upload-surefire-reports
|
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
api-key: ${{ secrets.FORESIGHT_API_KEY }}
|
2022-12-15 15:32:06 +00:00
|
|
|
surefire-reports-path: '**/target/surefire-reports/*.xml'
|
2022-12-15 13:22:20 +00:00
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
base-integration-tests:
|
|
|
|
name: Base IT
|
2022-09-02 14:45:01 +00:00
|
|
|
needs: build
|
2022-12-14 15:12:23 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 100
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
group: [1, 2, 3, 4, 5, 6]
|
|
|
|
fail-fast: false
|
2022-09-02 14:45:01 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
- id: integration-test-setup
|
|
|
|
name: Integration test setup
|
|
|
|
uses: ./.github/actions/integration-test-setup
|
|
|
|
|
|
|
|
- name: Run base tests
|
2022-09-02 14:45:01 +00:00
|
|
|
run: |
|
2022-12-14 15:12:23 +00:00
|
|
|
TESTS=`testsuite/integration-arquillian/tests/base/testsuites/base-suite.sh ${{ matrix.group }}`
|
|
|
|
echo "Tests: $TESTS"
|
2022-12-16 14:31:28 +00:00
|
|
|
./mvnw test -Dsurefire.rerunFailingTestsCount=${{ env.SUREFIRE_RERUN_FAILING_COUNT }} -nsu -B -Pauth-server-quarkus -Dtest=$TESTS -pl testsuite/integration-arquillian/tests/base | misc/log/trimmer.sh
|
2022-09-02 14:45:01 +00:00
|
|
|
|
2022-12-15 09:14:30 +00:00
|
|
|
- name: Upload JVM Heapdumps
|
|
|
|
if: always()
|
|
|
|
uses: ./.github/actions/upload-heapdumps
|
|
|
|
|
2022-12-15 13:22:20 +00:00
|
|
|
- id: upload-surefire-reports
|
|
|
|
name: Upload Surefire reports
|
|
|
|
uses: ./.github/actions/upload-surefire-reports
|
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
api-key: ${{ secrets.FORESIGHT_API_KEY }}
|
2022-12-15 15:32:06 +00:00
|
|
|
surefire-reports-path: 'testsuite/integration-arquillian/tests/base/target/surefire-reports/*.xml'
|
2022-12-15 13:22:20 +00:00
|
|
|
|
2022-12-16 12:02:05 +00:00
|
|
|
- uses: ./.github/actions/upload-flaky-tests
|
|
|
|
name: Upload flaky tests
|
2023-01-02 13:02:20 +00:00
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
with:
|
|
|
|
job-name: Base IT
|
2022-12-16 12:02:05 +00:00
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
quarkus-integration-tests:
|
|
|
|
name: Quarkus IT
|
2020-11-30 07:53:31 +00:00
|
|
|
needs: build
|
2022-12-14 15:12:23 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 115
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
server: [zip, container, storage]
|
|
|
|
fail-fast: false
|
|
|
|
env:
|
|
|
|
MAVEN_OPTS: -Xmx1024m
|
2020-11-30 07:53:31 +00:00
|
|
|
steps:
|
2022-03-28 15:51:51 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-12-14 15:12:23 +00:00
|
|
|
|
|
|
|
- id: unit-test-setup
|
|
|
|
name: Unit test setup
|
|
|
|
uses: ./.github/actions/unit-test-setup
|
|
|
|
|
2022-12-16 14:31:28 +00:00
|
|
|
# Not sure why, but needs to re-build otherwise there's some failures starting up
|
2022-12-14 15:12:23 +00:00
|
|
|
- name: Run Quarkus integration Tests
|
2020-11-30 07:53:31 +00:00
|
|
|
run: |
|
2022-12-14 15:12:23 +00:00
|
|
|
declare -A PARAMS
|
|
|
|
PARAMS["zip"]=""
|
|
|
|
PARAMS["container"]="-Dkc.quarkus.tests.dist=docker"
|
|
|
|
PARAMS["storage"]="-Ptest-database -Dtest=PostgreSQLDistTest,MariaDBDistTest#testSuccessful,MySQLDistTest#testSuccessful,DatabaseOptionsDistTest,JPAStoreDistTest,HotRodStoreDistTest,MixedStoreDistTest"
|
|
|
|
|
|
|
|
./mvnw install -nsu -B -pl quarkus/tests/integration -am -DskipTests
|
|
|
|
./mvnw test -nsu -B -pl quarkus/tests/integration ${PARAMS["${{ matrix.server }}"]} | misc/log/trimmer.sh
|
2020-11-30 07:53:31 +00:00
|
|
|
|
2022-12-15 09:14:30 +00:00
|
|
|
- name: Upload JVM Heapdumps
|
|
|
|
if: always()
|
|
|
|
uses: ./.github/actions/upload-heapdumps
|
|
|
|
|
2022-12-15 13:22:20 +00:00
|
|
|
- id: upload-surefire-reports
|
|
|
|
name: Upload Surefire reports
|
|
|
|
uses: ./.github/actions/upload-surefire-reports
|
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
api-key: ${{ secrets.FORESIGHT_API_KEY }}
|
2022-12-15 15:32:06 +00:00
|
|
|
surefire-reports-path: 'quarkus/tests/integration/target/surefire-reports/*.xml'
|
2022-12-15 13:22:20 +00:00
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
jdk-integration-tests:
|
|
|
|
name: Java Distribution IT
|
2020-05-14 13:49:00 +00:00
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
2022-11-17 10:38:21 +00:00
|
|
|
timeout-minutes: 100
|
2020-11-13 14:15:01 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-12-14 15:12:23 +00:00
|
|
|
dist: [temurin]
|
|
|
|
version: [17, 19]
|
2020-11-13 14:15:01 +00:00
|
|
|
fail-fast: false
|
2020-05-14 13:49:00 +00:00
|
|
|
steps:
|
2022-03-28 15:51:51 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-10-20 21:37:04 +00:00
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
- id: integration-test-setup
|
|
|
|
name: Integration test setup
|
|
|
|
uses: ./.github/actions/integration-test-setup
|
2020-11-05 09:23:15 +00:00
|
|
|
with:
|
2022-12-14 15:12:23 +00:00
|
|
|
jdk-dist: ${{ matrix.dist }}
|
|
|
|
jdk-version: ${{ matrix.version }}
|
2020-11-05 09:23:15 +00:00
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
- name: Prepare Quarkus distribution with current JDK
|
|
|
|
run: ./mvnw install -nsu -B -e -pl testsuite/integration-arquillian/servers/auth-server/quarkus
|
2020-11-10 09:40:06 +00:00
|
|
|
|
2020-05-14 13:49:00 +00:00
|
|
|
- name: Run base tests
|
2020-11-05 09:23:15 +00:00
|
|
|
run: |
|
2022-12-14 15:12:23 +00:00
|
|
|
TESTS=`testsuite/integration-arquillian/tests/base/testsuites/suite.sh jdk`
|
|
|
|
echo "Tests: $TESTS"
|
2023-01-04 13:38:05 +00:00
|
|
|
./mvnw test -Dsurefire.rerunFailingTestsCount=${{ env.SUREFIRE_RERUN_FAILING_COUNT }} -nsu -B -Pauth-server-quarkus -Dtest=$TESTS -pl testsuite/integration-arquillian/tests/base | misc/log/trimmer.sh
|
2022-10-17 21:33:22 +00:00
|
|
|
|
2022-12-15 09:14:30 +00:00
|
|
|
- name: Upload JVM Heapdumps
|
|
|
|
if: always()
|
|
|
|
uses: ./.github/actions/upload-heapdumps
|
|
|
|
|
2022-12-15 13:22:20 +00:00
|
|
|
- id: upload-surefire-reports
|
|
|
|
name: Upload Surefire reports
|
|
|
|
uses: ./.github/actions/upload-surefire-reports
|
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
api-key: ${{ secrets.FORESIGHT_API_KEY }}
|
2022-12-15 15:32:06 +00:00
|
|
|
surefire-reports-path: 'testsuite/integration-arquillian/tests/base/target/surefire-reports/*.xml'
|
2022-12-15 13:22:20 +00:00
|
|
|
|
2023-01-04 13:38:05 +00:00
|
|
|
- uses: ./.github/actions/upload-flaky-tests
|
|
|
|
name: Upload flaky tests
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
with:
|
|
|
|
job-name: Java Distribution IT
|
|
|
|
|
2022-12-17 07:50:21 +00:00
|
|
|
databases-new-store:
|
|
|
|
name: Databases New Store
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- id: matrix-db
|
|
|
|
# language=bash
|
|
|
|
run: |
|
|
|
|
# For PRs, run only PostgreSQL, on branches and nightly runs run all databases
|
|
|
|
if [ "${{ github.event_name }}" == "pull_request" ]; then
|
|
|
|
echo 'db=["chm", "hot-rod", "jpa-postgres"]' >> $GITHUB_OUTPUT
|
2022-12-21 07:15:38 +00:00
|
|
|
else
|
2022-12-17 07:50:21 +00:00
|
|
|
echo 'db=["chm", "hot-rod", "jpa-postgres", "jpa-cockroach"]' >> $GITHUB_OUTPUT
|
|
|
|
fi
|
|
|
|
outputs:
|
|
|
|
db: ${{ steps.matrix-db.outputs.db }}
|
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
new-store-integration-tests:
|
|
|
|
name: New Store IT
|
2022-12-17 07:50:21 +00:00
|
|
|
needs: [build, databases-new-store]
|
2022-10-17 21:33:22 +00:00
|
|
|
runs-on: ubuntu-latest
|
2023-01-09 12:12:58 +00:00
|
|
|
# Currently, the run of CockroachDB (only branches and nightly runs) is the longest with 50-60 minutes
|
|
|
|
timeout-minutes: 90
|
2022-10-17 21:33:22 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-12-17 07:50:21 +00:00
|
|
|
db: ${{ fromJson(needs.databases-new-store.outputs.db) }}
|
2022-10-17 21:33:22 +00:00
|
|
|
fail-fast: false
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
- id: integration-test-setup
|
|
|
|
name: Integration test setup
|
|
|
|
uses: ./.github/actions/integration-test-setup
|
2022-10-17 21:33:22 +00:00
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
- name: Run base tests
|
|
|
|
run: |
|
|
|
|
declare -A PARAMS
|
2022-12-16 17:55:31 +00:00
|
|
|
PARAMS["chm"]="-Pmap-storage-chm -Dpageload.timeout=90000"
|
|
|
|
PARAMS["hot-rod"]="-Pmap-storage-hot-rod -Dpageload.timeout=90000"
|
|
|
|
PARAMS["jpa-postgres"]="-Pmap-storage-jpa-postgres -Dpageload.timeout=90000"
|
|
|
|
PARAMS["jpa-cockroach"]="-Pmap-storage-jpa-cockroach -Dpageload.timeout=90000"
|
2022-10-17 21:33:22 +00:00
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
TESTS=`testsuite/integration-arquillian/tests/base/testsuites/suite.sh database`
|
|
|
|
echo "Tests: $TESTS"
|
2023-01-04 13:38:05 +00:00
|
|
|
./mvnw test -Dsurefire.rerunFailingTestsCount=${{ env.SUREFIRE_RERUN_FAILING_COUNT }} -nsu -B -Pauth-server-quarkus ${PARAMS["${{ matrix.db }}"]} -Dtest=$TESTS -pl testsuite/integration-arquillian/tests/base | misc/log/trimmer.sh
|
2022-12-14 15:12:23 +00:00
|
|
|
|
2022-12-15 09:14:30 +00:00
|
|
|
- name: Upload JVM Heapdumps
|
|
|
|
if: always()
|
|
|
|
uses: ./.github/actions/upload-heapdumps
|
|
|
|
|
2022-12-15 13:22:20 +00:00
|
|
|
- id: upload-surefire-reports
|
|
|
|
name: Upload Surefire reports
|
|
|
|
uses: ./.github/actions/upload-surefire-reports
|
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
api-key: ${{ secrets.FORESIGHT_API_KEY }}
|
2022-12-15 15:32:06 +00:00
|
|
|
surefire-reports-path: 'testsuite/integration-arquillian/tests/base/target/surefire-reports/*.xml'
|
2022-12-15 13:22:20 +00:00
|
|
|
|
2023-01-04 13:38:05 +00:00
|
|
|
- uses: ./.github/actions/upload-flaky-tests
|
|
|
|
name: Upload flaky tests
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
with:
|
|
|
|
job-name: New Store IT
|
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
legacy-store-integration-tests:
|
|
|
|
name: Legacy Store IT
|
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 45
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-01-10 16:37:27 +00:00
|
|
|
db: [postgres, mysql, oracle, mssql, mariadb]
|
2022-12-14 15:12:23 +00:00
|
|
|
fail-fast: false
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- id: integration-test-setup
|
|
|
|
name: Integration test setup
|
|
|
|
uses: ./.github/actions/integration-test-setup
|
2022-10-17 21:33:22 +00:00
|
|
|
|
|
|
|
- name: Run base tests
|
|
|
|
run: |
|
2022-12-14 15:12:23 +00:00
|
|
|
TESTS=`testsuite/integration-arquillian/tests/base/testsuites/suite.sh database`
|
|
|
|
echo "Tests: $TESTS"
|
2023-01-04 13:38:05 +00:00
|
|
|
./mvnw test -Dsurefire.rerunFailingTestsCount=${{ env.SUREFIRE_RERUN_FAILING_COUNT }} -nsu -B -Pauth-server-quarkus -Pdb-${{ matrix.db }} -Dtest=$TESTS -pl testsuite/integration-arquillian/tests/base | misc/log/trimmer.sh
|
2022-05-19 08:55:53 +00:00
|
|
|
|
2022-12-15 09:14:30 +00:00
|
|
|
- name: Upload JVM Heapdumps
|
|
|
|
if: always()
|
|
|
|
uses: ./.github/actions/upload-heapdumps
|
|
|
|
|
2022-12-15 13:22:20 +00:00
|
|
|
- id: upload-surefire-reports
|
|
|
|
name: Upload Surefire reports
|
|
|
|
uses: ./.github/actions/upload-surefire-reports
|
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
api-key: ${{ secrets.FORESIGHT_API_KEY }}
|
2022-12-15 15:32:06 +00:00
|
|
|
surefire-reports-path: 'testsuite/integration-arquillian/tests/base/target/surefire-reports/*.xml'
|
2022-12-15 13:22:20 +00:00
|
|
|
|
2023-01-04 13:38:05 +00:00
|
|
|
- uses: ./.github/actions/upload-flaky-tests
|
|
|
|
name: Upload flaky tests
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
with:
|
|
|
|
job-name: Legacy Store IT
|
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
store-model-tests:
|
|
|
|
name: Store Model Tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
2023-01-06 07:57:40 +00:00
|
|
|
timeout-minutes: 75
|
2022-12-14 15:12:23 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- id: integration-test-setup
|
|
|
|
name: Integration test setup
|
|
|
|
uses: ./.github/actions/integration-test-setup
|
|
|
|
|
|
|
|
- name: Run model tests
|
2023-01-06 08:15:01 +00:00
|
|
|
run: testsuite/model/test-all-profiles.sh -Dsurefire.rerunFailingTestsCount=${{ env.SUREFIRE_RERUN_FAILING_COUNT }}
|
2020-11-05 14:35:47 +00:00
|
|
|
|
2022-12-15 09:14:30 +00:00
|
|
|
- name: Upload JVM Heapdumps
|
|
|
|
if: always()
|
|
|
|
uses: ./.github/actions/upload-heapdumps
|
|
|
|
|
2023-01-06 08:15:01 +00:00
|
|
|
- uses: ./.github/actions/upload-flaky-tests
|
|
|
|
name: Upload flaky tests
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
with:
|
|
|
|
job-name: Store Model Tests
|
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
clustering-integration-tests:
|
|
|
|
name: Legacy Clustering IT
|
2020-11-05 14:35:47 +00:00
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
2022-10-27 08:43:51 +00:00
|
|
|
timeout-minutes: 35
|
2020-11-05 14:35:47 +00:00
|
|
|
env:
|
2021-04-15 10:53:48 +00:00
|
|
|
MAVEN_OPTS: -Xmx1024m
|
2020-11-05 14:35:47 +00:00
|
|
|
steps:
|
2022-03-28 15:51:51 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-04-14 14:42:47 +00:00
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
- id: integration-test-setup
|
|
|
|
name: Integration test setup
|
|
|
|
uses: ./.github/actions/integration-test-setup
|
2020-11-10 09:40:06 +00:00
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
- name: Run cluster tests
|
2020-11-05 14:35:47 +00:00
|
|
|
run: |
|
2023-01-04 13:38:05 +00:00
|
|
|
./mvnw test -Dsurefire.rerunFailingTestsCount=${{ env.SUREFIRE_RERUN_FAILING_COUNT }} -nsu -B -Pauth-server-cluster-quarkus -Dsession.cache.owners=2 -Dtest=**.cluster.** -pl testsuite/integration-arquillian/tests/base | misc/log/trimmer.sh
|
2021-04-13 15:28:34 +00:00
|
|
|
|
2022-12-15 09:14:30 +00:00
|
|
|
- name: Upload JVM Heapdumps
|
|
|
|
if: always()
|
|
|
|
uses: ./.github/actions/upload-heapdumps
|
|
|
|
|
2022-12-15 13:22:20 +00:00
|
|
|
- id: upload-surefire-reports
|
|
|
|
name: Upload Surefire reports
|
|
|
|
uses: ./.github/actions/upload-surefire-reports
|
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
api-key: ${{ secrets.FORESIGHT_API_KEY }}
|
2022-12-15 15:32:06 +00:00
|
|
|
surefire-reports-path: 'testsuite/integration-arquillian/tests/base/target/surefire-reports/*.xml'
|
2022-12-15 13:22:20 +00:00
|
|
|
|
2023-01-04 13:38:05 +00:00
|
|
|
- uses: ./.github/actions/upload-flaky-tests
|
|
|
|
name: Upload flaky tests
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
with:
|
|
|
|
job-name: Legacy Clustering IT
|
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
fips-unit-tests:
|
|
|
|
name: FIPS UT
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
|
|
|
timeout-minutes: 20
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- id: unit-test-setup
|
|
|
|
name: Unit test setup
|
|
|
|
uses: ./.github/actions/unit-test-setup
|
|
|
|
|
|
|
|
- name: Run crypto tests (BCFIPS non-approved mode)
|
2022-12-16 14:31:28 +00:00
|
|
|
run: ./mvnw test -nsu -B -am -pl crypto/default,crypto/fips1402,crypto/elytron -Dcom.redhat.fips=true
|
2021-11-23 14:45:46 +00:00
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
- name: Run crypto tests (BCFIPS approved mode)
|
2022-12-16 14:31:28 +00:00
|
|
|
run: ./mvnw test -nsu -B -am -pl crypto/default,crypto/fips1402,crypto/elytron -Dcom.redhat.fips=true -Dorg.bouncycastle.fips.approved_only=true
|
2022-12-14 15:12:23 +00:00
|
|
|
|
2022-12-15 09:14:30 +00:00
|
|
|
- name: Upload JVM Heapdumps
|
|
|
|
if: always()
|
|
|
|
uses: ./.github/actions/upload-heapdumps
|
|
|
|
|
2022-12-15 13:22:20 +00:00
|
|
|
- id: upload-surefire-reports
|
|
|
|
name: Upload Surefire reports
|
|
|
|
uses: ./.github/actions/upload-surefire-reports
|
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
api-key: ${{ secrets.FORESIGHT_API_KEY }}
|
2022-12-15 15:32:06 +00:00
|
|
|
surefire-reports-path: '**/target/surefire-reports/*.xml'
|
2022-12-15 13:22:20 +00:00
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
fips-integration-tests:
|
|
|
|
name: FIPS IT
|
2021-11-23 14:45:46 +00:00
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
2022-12-14 15:12:23 +00:00
|
|
|
timeout-minutes: 45
|
2021-11-23 14:45:46 +00:00
|
|
|
steps:
|
2022-03-28 15:51:51 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-11-29 12:28:04 +00:00
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
- id: integration-test-setup
|
|
|
|
name: Integration test setup
|
|
|
|
uses: ./.github/actions/integration-test-setup
|
2021-11-29 12:28:04 +00:00
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
- name: Prepare Quarkus distribution with BCFIPS
|
|
|
|
run: ./mvnw install -nsu -B -e -pl testsuite/integration-arquillian/servers/auth-server/quarkus -Pauth-server-quarkus,auth-server-fips140-2
|
2021-12-21 16:45:16 +00:00
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
- name: Run base tests
|
2021-12-21 16:45:16 +00:00
|
|
|
run: |
|
2022-12-14 15:12:23 +00:00
|
|
|
TESTS=`testsuite/integration-arquillian/tests/base/testsuites/suite.sh fips`
|
|
|
|
echo "Tests: $TESTS"
|
2023-01-04 13:38:05 +00:00
|
|
|
./mvnw test -Dsurefire.rerunFailingTestsCount=${{ env.SUREFIRE_RERUN_FAILING_COUNT }} -nsu -B -Pauth-server-quarkus,auth-server-fips140-2 -Dtest=$TESTS -pl testsuite/integration-arquillian/tests/base | misc/log/trimmer.sh
|
2022-12-14 15:12:23 +00:00
|
|
|
|
2022-12-15 09:14:30 +00:00
|
|
|
- name: Upload JVM Heapdumps
|
|
|
|
if: always()
|
|
|
|
uses: ./.github/actions/upload-heapdumps
|
|
|
|
|
2022-12-15 13:22:20 +00:00
|
|
|
- id: upload-surefire-reports
|
|
|
|
name: Upload Surefire reports
|
|
|
|
uses: ./.github/actions/upload-surefire-reports
|
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
api-key: ${{ secrets.FORESIGHT_API_KEY }}
|
2022-12-15 15:32:06 +00:00
|
|
|
surefire-reports-path: 'testsuite/integration-arquillian/tests/base/target/surefire-reports/*.xml'
|
2022-12-15 13:22:20 +00:00
|
|
|
|
2023-01-04 13:38:05 +00:00
|
|
|
- uses: ./.github/actions/upload-flaky-tests
|
|
|
|
name: Upload flaky tests
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
with:
|
|
|
|
job-name: FIPS IT
|
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
check-set-status:
|
|
|
|
name: Set check conclusion
|
|
|
|
needs:
|
|
|
|
- unit-tests
|
|
|
|
- base-integration-tests
|
|
|
|
- quarkus-integration-tests
|
|
|
|
- jdk-integration-tests
|
|
|
|
- new-store-integration-tests
|
|
|
|
- legacy-store-integration-tests
|
|
|
|
- store-model-tests
|
|
|
|
- clustering-integration-tests
|
|
|
|
- fips-unit-tests
|
|
|
|
- fips-integration-tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
conclusion: ${{ steps.check.outputs.conclusion }}
|
2021-11-23 14:45:46 +00:00
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2022-02-01 13:08:44 +00:00
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
- id: check
|
|
|
|
uses: ./.github/actions/checks-success
|
|
|
|
|
|
|
|
check:
|
2022-12-14 16:44:40 +00:00
|
|
|
name: Status Check - Keycloak CI
|
2022-12-14 15:12:23 +00:00
|
|
|
if: always() && ( github.event_name != 'schedule' || github.repository == 'keycloak/keycloak' )
|
|
|
|
needs: [check-set-status]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Check status
|
|
|
|
uses: ./.github/actions/checks-job-pass
|
2021-11-23 14:45:46 +00:00
|
|
|
with:
|
2022-12-14 15:12:23 +00:00
|
|
|
conclusion: ${{ needs.check-set-status.outputs.conclusion }}
|