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:
|
2023-02-22 06:20:14 +00:00
|
|
|
DEFAULT_JDK_VERSION: 17
|
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:
|
2023-01-30 07:07:10 +00:00
|
|
|
|
|
|
|
conditional:
|
|
|
|
name: Check conditional workflows and jobs
|
|
|
|
if: github.event_name != 'schedule' || github.repository == 'keycloak/keycloak'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
ci: ${{ steps.conditional.outputs.ci }}
|
2023-05-10 13:25:12 +00:00
|
|
|
sssd: ${{ steps.conditional.outputs.sssd }}
|
2023-01-30 07:07:10 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- id: conditional
|
|
|
|
uses: ./.github/actions/conditional
|
|
|
|
|
2020-05-14 13:49:00 +00:00
|
|
|
build:
|
|
|
|
name: Build
|
2023-01-30 07:07:10 +00:00
|
|
|
if: needs.conditional.outputs.ci == 'true'
|
2020-05-14 13:49:00 +00:00
|
|
|
runs-on: ubuntu-latest
|
2023-01-30 07:07:10 +00:00
|
|
|
needs: conditional
|
2020-05-14 13:49:00 +00:00
|
|
|
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=""
|
2023-03-17 09:36:02 +00:00
|
|
|
for i in `find -name '*Test.java' -type f | egrep -v './(testsuite|quarkus|docs)/' | sed 's|/src/test/java/.*||' | sort | uniq | sed 's|./||'`; do
|
2022-12-16 14:31:28 +00:00
|
|
|
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-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"
|
2023-04-21 08:22:29 +00:00
|
|
|
./mvnw test -Dsurefire.rerunFailingTestsCount=${{ env.SUREFIRE_RERUN_FAILING_COUNT }} -nsu -B -Pauth-server-quarkus "-Dwebdriver.chrome.driver=$CHROMEWEBDRIVER/chromedriver" -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-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"
|
2023-05-04 17:08:10 +00:00
|
|
|
PARAMS["storage"]="-Ptest-database -Dtest=PostgreSQLDistTest,MariaDBDistTest#testSuccessful,MySQLDistTest#testSuccessful,DatabaseOptionsDistTest,JPAStoreDistTest,HotRodStoreDistTest,MixedStoreDistTest,TransactionConfigurationDistTest"
|
2022-12-14 15:12:23 +00:00
|
|
|
|
|
|
|
./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-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]
|
2023-06-29 15:46:28 +00:00
|
|
|
version: [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
|
|
|
|
2023-03-21 19:25:35 +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-03-21 19:25:35 +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
|
|
|
|
2023-02-22 06:20:14 +00:00
|
|
|
- name: Build with JDK
|
|
|
|
run:
|
|
|
|
./mvnw install -nsu -B -e -DskipTests -DskipExamples
|
|
|
|
|
2022-12-15 09:14:30 +00:00
|
|
|
- name: Upload JVM Heapdumps
|
|
|
|
if: always()
|
|
|
|
uses: ./.github/actions/upload-heapdumps
|
|
|
|
|
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-03-21 19:25:35 +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
|
|
|
|
|
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
|
2023-05-16 06:59:41 +00:00
|
|
|
timeout-minutes: 60
|
2022-12-14 15:12:23 +00:00
|
|
|
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-03-21 19:25:35 +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
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
2023-02-09 09:14:20 +00:00
|
|
|
- name: Fake fips
|
|
|
|
run: |
|
|
|
|
cd .github/fake_fips
|
|
|
|
make
|
|
|
|
sudo insmod fake_fips.ko
|
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
- id: unit-test-setup
|
|
|
|
name: Unit test setup
|
|
|
|
uses: ./.github/actions/unit-test-setup
|
2023-02-09 09:14:20 +00:00
|
|
|
with:
|
|
|
|
jdk-version: 17
|
2022-12-14 15:12:23 +00:00
|
|
|
|
2023-02-09 09:14:20 +00:00
|
|
|
- name: Run crypto tests
|
2023-04-27 07:06:46 +00:00
|
|
|
run: docker run --rm --workdir /github/workspace -v "${{ github.workspace }}":"/github/workspace" -v "$HOME/.m2":"/root/.m2" registry.access.redhat.com/ubi8/ubi:latest .github/scripts/run-fips-ut.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-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
|
2023-02-03 11:00:09 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
mode: [non-strict, strict]
|
|
|
|
fail-fast: false
|
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
|
|
|
|
2023-02-09 09:14:20 +00:00
|
|
|
- name: Fake fips
|
|
|
|
run: |
|
|
|
|
cd .github/fake_fips
|
|
|
|
make
|
|
|
|
sudo insmod fake_fips.ko
|
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
- id: integration-test-setup
|
|
|
|
name: Integration test setup
|
|
|
|
uses: ./.github/actions/integration-test-setup
|
2023-02-09 09:14:20 +00:00
|
|
|
with:
|
|
|
|
jdk-version: 17
|
2021-11-29 12:28:04 +00:00
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
- name: Prepare Quarkus distribution with BCFIPS
|
2023-03-21 19:25:35 +00:00
|
|
|
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
|
2023-04-27 07:06:46 +00:00
|
|
|
run: docker run --rm --workdir /github/workspace -e "SUREFIRE_RERUN_FAILING_COUNT" -v "${{ github.workspace }}":"/github/workspace" -v "$HOME/.m2":"/root/.m2" registry.access.redhat.com/ubi8/ubi:latest .github/scripts/run-fips-it.sh ${{ matrix.mode }}
|
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
|
|
|
|
|
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
|
|
|
|
|
2023-01-24 15:01:03 +00:00
|
|
|
account-console-integration-tests:
|
|
|
|
name: Account Console IT
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
|
|
|
timeout-minutes: 75
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-05-25 08:02:05 +00:00
|
|
|
browser: [chrome, firefox]
|
2023-01-24 15:01:03 +00:00
|
|
|
fail-fast: false
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- id: integration-test-setup
|
|
|
|
name: Integration test setup
|
|
|
|
uses: ./.github/actions/integration-test-setup
|
|
|
|
|
|
|
|
- name: Run Account Console IT
|
2023-06-20 16:26:28 +00:00
|
|
|
run: ./mvnw test -Dsurefire.rerunFailingTestsCount=${{ env.SUREFIRE_RERUN_FAILING_COUNT }} -nsu -B -Pauth-server-quarkus -Dtest=**.account2.**,!SigningInTest#passwordlessWebAuthnTest,!SigningInTest#twoFactorWebAuthnTest -Dbrowser=${{ matrix.browser }} "-Dwebdriver.chrome.driver=$CHROMEWEBDRIVER/chromedriver" "-Dwebdriver.gecko.driver=$GECKOWEBDRIVER/geckodriver" -f testsuite/integration-arquillian/tests/other/base-ui/pom.xml | misc/log/trimmer.sh
|
2023-01-24 15:01:03 +00:00
|
|
|
|
|
|
|
- name: Upload JVM Heapdumps
|
|
|
|
if: always()
|
|
|
|
uses: ./.github/actions/upload-heapdumps
|
|
|
|
|
|
|
|
- uses: ./.github/actions/upload-flaky-tests
|
|
|
|
name: Upload flaky tests
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
with:
|
|
|
|
job-name: Account Console IT
|
|
|
|
|
2023-06-19 12:44:20 +00:00
|
|
|
forms-integration-tests:
|
|
|
|
name: Forms IT
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
|
|
|
timeout-minutes: 75
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
browser: [chrome, firefox]
|
|
|
|
fail-fast: false
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- id: integration-test-setup
|
|
|
|
name: Integration test setup
|
|
|
|
uses: ./.github/actions/integration-test-setup
|
|
|
|
|
|
|
|
- name: Run Forms IT
|
|
|
|
run: |
|
|
|
|
TESTS=`testsuite/integration-arquillian/tests/base/testsuites/suite.sh forms`
|
|
|
|
echo "Tests: $TESTS"
|
2023-06-20 16:26:28 +00:00
|
|
|
./mvnw test -Dsurefire.rerunFailingTestsCount=${{ env.SUREFIRE_RERUN_FAILING_COUNT }} -nsu -B -Pauth-server-quarkus -Dtest=$TESTS -Dbrowser=${{ matrix.browser }} "-Dwebdriver.chrome.driver=$CHROMEWEBDRIVER/chromedriver" "-Dwebdriver.gecko.driver=$GECKOWEBDRIVER/geckodriver" -f testsuite/integration-arquillian/tests/base/pom.xml | misc/log/trimmer.sh
|
2023-06-19 12:44:20 +00:00
|
|
|
|
|
|
|
- name: Upload JVM Heapdumps
|
|
|
|
if: always()
|
|
|
|
uses: ./.github/actions/upload-heapdumps
|
|
|
|
|
|
|
|
- uses: ./.github/actions/upload-flaky-tests
|
|
|
|
name: Upload flaky tests
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
with:
|
|
|
|
job-name: Forms IT
|
|
|
|
|
2023-02-13 12:28:25 +00:00
|
|
|
webauthn-integration-tests:
|
|
|
|
name: WebAuthn IT
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
2023-02-23 20:58:13 +00:00
|
|
|
timeout-minutes: 45
|
2023-02-13 12:28:25 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-05-25 08:02:05 +00:00
|
|
|
browser: [chrome, firefox]
|
2023-02-13 12:28:25 +00:00
|
|
|
fail-fast: false
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- id: integration-test-setup
|
|
|
|
name: Integration test setup
|
|
|
|
uses: ./.github/actions/integration-test-setup
|
|
|
|
|
|
|
|
- name: Run WebAuthn IT
|
2023-06-20 16:26:28 +00:00
|
|
|
run: ./mvnw test -Dsurefire.rerunFailingTestsCount=${{ env.SUREFIRE_RERUN_FAILING_COUNT }} -nsu -B -Pauth-server-quarkus -Dtest=org.keycloak.testsuite.webauthn.**.*Test -Dbrowser=${{ matrix.browser }} "-Dwebdriver.chrome.driver=$CHROMEWEBDRIVER/chromedriver" "-Dwebdriver.gecko.driver=$GECKOWEBDRIVER/geckodriver" -Pwebauthn -f testsuite/integration-arquillian/tests/other/pom.xml | misc/log/trimmer.sh
|
2023-02-13 12:28:25 +00:00
|
|
|
|
|
|
|
- name: Upload JVM Heapdumps
|
|
|
|
if: always()
|
|
|
|
uses: ./.github/actions/upload-heapdumps
|
|
|
|
|
|
|
|
- uses: ./.github/actions/upload-flaky-tests
|
|
|
|
name: Upload flaky tests
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
with:
|
|
|
|
job-name: WebAuthn IT
|
|
|
|
|
2023-05-10 13:25:12 +00:00
|
|
|
sssd-unit-tests:
|
|
|
|
name: SSSD
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs:
|
|
|
|
- conditional
|
|
|
|
- build
|
|
|
|
timeout-minutes: 30
|
|
|
|
steps:
|
|
|
|
- name: checkout
|
|
|
|
if: ${{ needs.conditional.outputs.sssd == 'true' }}
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- id: integration-test-setup
|
|
|
|
if: ${{ needs.conditional.outputs.sssd == 'true' }}
|
|
|
|
name: Integration test setup
|
|
|
|
uses: ./.github/actions/integration-test-setup
|
|
|
|
|
|
|
|
- id: weekly-cache-key
|
|
|
|
if: ${{ needs.conditional.outputs.sssd == 'true' }}
|
|
|
|
name: Key for weekly rotation of cache
|
|
|
|
shell: bash
|
|
|
|
run: echo "key=ipa-data-`date -u "+%Y-%U"`" >> $GITHUB_OUTPUT
|
|
|
|
|
|
|
|
- id: cache-maven-repository
|
|
|
|
if: ${{ needs.conditional.outputs.sssd == 'true' }}
|
|
|
|
name: ipa-data cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: ~/ipa-data.tar
|
|
|
|
key: ${{ steps.weekly-cache-key.outputs.key }}
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
if: ${{ needs.conditional.outputs.sssd == 'true' }}
|
|
|
|
run: .github/scripts/run-ipa.sh "${{ github.workspace }}"
|
2023-02-13 12:28:25 +00:00
|
|
|
|
2023-05-17 10:32:44 +00:00
|
|
|
migration-tests:
|
|
|
|
name: Migration Tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
|
|
|
timeout-minutes: 45
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
old-version: [19.0.3]
|
|
|
|
database: [postgres, mysql, oracle, mssql, mariadb]
|
|
|
|
fail-fast: false
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- id: integration-test-setup
|
|
|
|
name: Integration test setup
|
|
|
|
uses: ./.github/actions/integration-test-setup
|
|
|
|
|
|
|
|
- name: Run Migration Tests
|
|
|
|
run: |
|
|
|
|
./mvnw clean install -Dsurefire.rerunFailingTestsCount=${{ env.SUREFIRE_RERUN_FAILING_COUNT }} -B \
|
|
|
|
-Pauth-server-quarkus -Pdb-${{ matrix.database }} -Pauth-server-migration \
|
|
|
|
-Dtest=MigrationTest \
|
|
|
|
-Dmigration.mode=auto \
|
|
|
|
-Dmigrated.auth.server.version=${{ matrix.old-version }} \
|
|
|
|
-Dmigration.import.file.name=migration-realm-${{ matrix.old-version }}.json \
|
|
|
|
-Dauth.server.ssl.required=false \
|
|
|
|
-Dauth.server.db.host=localhost \
|
|
|
|
-f testsuite/integration-arquillian/pom.xml | misc/log/trimmer.sh
|
|
|
|
|
|
|
|
- name: Upload JVM Heapdumps
|
|
|
|
if: always()
|
|
|
|
uses: ./.github/actions/upload-heapdumps
|
|
|
|
|
|
|
|
- uses: ./.github/actions/upload-flaky-tests
|
|
|
|
name: Upload flaky tests
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
with:
|
|
|
|
job-name: Migration Tests
|
|
|
|
|
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
|
2023-01-24 15:01:03 +00:00
|
|
|
- account-console-integration-tests
|
2023-06-19 12:44:20 +00:00
|
|
|
- forms-integration-tests
|
2023-02-13 12:28:25 +00:00
|
|
|
- webauthn-integration-tests
|
2023-05-10 13:25:12 +00:00
|
|
|
- sssd-unit-tests
|
2023-05-17 10:32:44 +00:00
|
|
|
- migration-tests
|
2022-12-14 15:12:23 +00:00
|
|
|
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' )
|
2023-01-30 07:07:10 +00:00
|
|
|
needs:
|
|
|
|
- conditional
|
|
|
|
- check-set-status
|
2022-12-14 15:12:23 +00:00
|
|
|
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:
|
2023-01-30 07:07:10 +00:00
|
|
|
required: ${{ needs.conditional.outputs.ci }}
|
2022-12-14 15:12:23 +00:00
|
|
|
conclusion: ${{ needs.check-set-status.outputs.conclusion }}
|