2020-05-14 13:49:00 +00:00
|
|
|
name: Keycloak CI
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 1.8
|
|
|
|
- name: Cache Maven packages
|
2020-11-05 09:23:15 +00:00
|
|
|
id: cache
|
2020-05-14 13:49:00 +00:00
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
2020-11-05 09:23:15 +00:00
|
|
|
path: |
|
|
|
|
~/.m2/repository
|
2020-11-10 09:40:06 +00:00
|
|
|
key: cache-1-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
|
|
restore-keys: cache-1-${{ runner.os }}-m2
|
2020-11-05 14:35:47 +00:00
|
|
|
|
|
|
|
- name: Build Keycloak
|
2020-11-10 09:40:06 +00:00
|
|
|
run: mvn clean install -nsu -B -e -DskipTests -Pquarkus,distribution
|
2020-05-14 13:49:00 +00:00
|
|
|
|
2020-11-05 14:35:47 +00:00
|
|
|
- name: Store Keycloak artifacts
|
|
|
|
id: store-keycloak
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: keycloak-artifacts.zip
|
|
|
|
retention-days: 2
|
|
|
|
path: |
|
|
|
|
~/.m2/repository/org/keycloak
|
|
|
|
!~/.m2/repository/org/keycloak/**/*.tar.gz
|
|
|
|
|
2020-11-10 09:40:06 +00:00
|
|
|
- name: Remove keycloak artifacts before caching
|
|
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
|
|
run: rm -rf ~/.m2/repository/org/keycloak
|
|
|
|
|
2020-11-05 14:35:47 +00:00
|
|
|
## Tests: Regular distribution
|
|
|
|
|
2020-11-04 06:57:19 +00:00
|
|
|
unit-tests:
|
|
|
|
name: Unit Tests
|
|
|
|
runs-on: ubuntu-latest
|
2020-11-05 09:23:15 +00:00
|
|
|
needs: build
|
2020-11-04 06:57:19 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 1.8
|
|
|
|
- name: Cache Maven packages
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.m2/repository
|
2020-11-10 09:40:06 +00:00
|
|
|
key: cache-1-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
|
|
restore-keys: cache-1-${{ runner.os }}-m2
|
|
|
|
- name: Cleanup org.keycloak artifacts
|
|
|
|
run: rm -rf ~/.m2/repository/org/keycloak >/dev/null || true
|
2020-11-05 14:35:47 +00:00
|
|
|
- name: Download built keycloak
|
|
|
|
id: download-keycloak
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
2020-11-10 09:40:06 +00:00
|
|
|
path: ~/.m2/repository/org/keycloak/
|
2020-11-05 14:35:47 +00:00
|
|
|
name: keycloak-artifacts.zip
|
2020-11-04 06:57:19 +00:00
|
|
|
- name: Run unit tests
|
2020-11-05 14:35:47 +00:00
|
|
|
run: |
|
|
|
|
mvn install -nsu -B -DskipTestsuite -DskipExamples -f pom.xml
|
|
|
|
TEST_RESULT=$?
|
2020-11-13 07:46:30 +00:00
|
|
|
find . -path '*/target/surefire-reports/*.xml' | zip -q reports-unit-tests.zip -@
|
2020-11-05 14:35:47 +00:00
|
|
|
exit $TEST_RESULT
|
|
|
|
|
|
|
|
- name: Unit test reports
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
if: failure()
|
|
|
|
with:
|
2020-11-13 07:46:30 +00:00
|
|
|
name: reports-unit-tests
|
2020-11-05 14:35:47 +00:00
|
|
|
retention-days: 14
|
|
|
|
path: reports-unit-tests.zip
|
2020-11-10 09:40:06 +00:00
|
|
|
if-no-files-found: ignore
|
2020-11-04 06:57:19 +00:00
|
|
|
|
2020-05-14 13:49:00 +00:00
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-11-05 09:23:15 +00:00
|
|
|
|
|
|
|
- name: Cache Maven packages
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
2020-11-10 09:40:06 +00:00
|
|
|
path: ~/.m2/repository
|
|
|
|
key: cache-1-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
|
|
restore-keys: cache-1-${{ runner.os }}-m2
|
2020-11-05 14:35:47 +00:00
|
|
|
|
|
|
|
- name: Download built keycloak
|
|
|
|
id: download-keycloak
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
2020-11-10 09:40:06 +00:00
|
|
|
path: ~/.m2/repository/org/keycloak/
|
2020-11-05 14:35:47 +00:00
|
|
|
name: keycloak-artifacts.zip
|
2020-11-05 09:23:15 +00:00
|
|
|
|
2020-11-10 09:40:06 +00:00
|
|
|
# - name: List M2 repo
|
|
|
|
# run: |
|
|
|
|
# find ~ -name *dist*.zip
|
|
|
|
# ls -lR ~/.m2/repository
|
|
|
|
|
2020-05-14 13:49:00 +00:00
|
|
|
- uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 1.8
|
2020-11-05 09:23:15 +00:00
|
|
|
|
2020-05-14 13:49:00 +00:00
|
|
|
- name: Run base tests
|
2020-11-05 09:23:15 +00:00
|
|
|
run: |
|
2020-11-10 09:40:06 +00:00
|
|
|
echo '::group::Compiling testsuite'
|
2020-11-05 14:35:47 +00:00
|
|
|
mvn clean install -nsu -B -Pauth-server-wildfly -DskipTests -f testsuite/pom.xml
|
2020-11-10 09:40:06 +00:00
|
|
|
echo '::endgroup::'
|
2020-11-05 14:35:47 +00:00
|
|
|
mvn clean install -nsu -B -Pauth-server-wildfly -f testsuite/integration-arquillian/tests/base/pom.xml | misc/log/trimmer.sh
|
|
|
|
TEST_RESULT=${PIPESTATUS[0]}
|
2020-11-13 07:46:30 +00:00
|
|
|
find . -path '*/target/surefire-reports/*.xml' | zip -q reports-base-tests.zip -@
|
2020-11-05 14:35:47 +00:00
|
|
|
exit $TEST_RESULT
|
|
|
|
|
|
|
|
- name: Base test reports
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
if: failure()
|
|
|
|
with:
|
2020-11-13 07:46:30 +00:00
|
|
|
name: reports-base-tests
|
2020-11-05 14:35:47 +00:00
|
|
|
retention-days: 14
|
|
|
|
path: reports-base-tests.zip
|
2020-11-10 09:40:06 +00:00
|
|
|
if-no-files-found: ignore
|
2020-11-04 06:57:19 +00:00
|
|
|
|
2020-11-05 13:36:38 +00:00
|
|
|
test-cluster:
|
|
|
|
name: Test Clustering
|
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2020-11-05 14:35:47 +00:00
|
|
|
- name: Check whether this phase should run
|
|
|
|
run: echo "GIT_DIFF=$( git diff --name-only HEAD^ | egrep -ic 'crossdc|infinispan' )" >> $GITHUB_ENV
|
|
|
|
|
2020-11-05 13:36:38 +00:00
|
|
|
- name: Cache Maven packages
|
2020-11-05 14:35:47 +00:00
|
|
|
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
|
2020-11-05 13:36:38 +00:00
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
2020-11-10 09:40:06 +00:00
|
|
|
path: ~/.m2/repository
|
|
|
|
key: cache-1-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
|
|
restore-keys: cache-1-${{ runner.os }}-m2
|
|
|
|
|
|
|
|
- name: Cleanup org.keycloak artifacts
|
|
|
|
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
|
|
|
|
run: rm -rf ~/.m2/repository/org/keycloak >/dev/null || true
|
2020-11-05 14:35:47 +00:00
|
|
|
|
|
|
|
- name: Download built keycloak
|
|
|
|
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
|
|
|
|
id: download-keycloak
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
2020-11-10 09:40:06 +00:00
|
|
|
path: ~/.m2/repository/org/keycloak/
|
2020-11-05 14:35:47 +00:00
|
|
|
name: keycloak-artifacts.zip
|
2020-11-05 13:36:38 +00:00
|
|
|
|
|
|
|
- uses: actions/setup-java@v1
|
2020-11-05 14:35:47 +00:00
|
|
|
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
|
2020-11-05 13:36:38 +00:00
|
|
|
with:
|
|
|
|
java-version: 1.8
|
|
|
|
|
|
|
|
- name: Run cluster tests
|
2020-11-05 14:35:47 +00:00
|
|
|
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
|
2020-11-05 13:36:38 +00:00
|
|
|
run: |
|
2020-11-05 14:35:47 +00:00
|
|
|
mvn clean install -nsu -B -Pauth-server-wildfly,auth-server-cluster,db-mysql,jpa -Dsession.cache.owners=2 -Dbackends.console.output=true -Dauth.server.log.check=false -Dfrontend.console.output=true -Dtest=org.keycloak.testsuite.cluster.**.*Test -f testsuite/integration-arquillian/pom.xml | misc/log/trimmer.sh
|
|
|
|
TEST_RESULT=${PIPESTATUS[0]}
|
2020-11-13 07:46:30 +00:00
|
|
|
find . -path '*/target/surefire-reports/*.xml' | zip -q reports-cluster-tests.zip -@
|
2020-11-05 14:35:47 +00:00
|
|
|
exit $TEST_RESULT
|
|
|
|
|
|
|
|
- name: Cluster test reports
|
|
|
|
if: failure()
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2020-11-13 07:46:30 +00:00
|
|
|
name: reports-cluster-tests
|
2020-11-05 14:35:47 +00:00
|
|
|
retention-days: 14
|
|
|
|
path: reports-cluster-tests.zip
|
2020-11-10 09:40:06 +00:00
|
|
|
if-no-files-found: ignore
|
2020-11-05 13:36:38 +00:00
|
|
|
|
2020-11-04 16:32:25 +00:00
|
|
|
test-crossdc:
|
2020-11-05 14:35:47 +00:00
|
|
|
name: Cross-DC Tests
|
2020-11-04 16:32:25 +00:00
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
MAVEN_OPTS: -Xmx1024m
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 2
|
2020-11-05 09:23:15 +00:00
|
|
|
|
|
|
|
- name: Check whether this phase should run
|
|
|
|
run: echo "GIT_DIFF=$( git diff --name-only HEAD^ | egrep -ic 'crossdc|infinispan' )" >> $GITHUB_ENV
|
|
|
|
|
2020-11-04 16:32:25 +00:00
|
|
|
- uses: actions/setup-java@v1
|
2020-11-05 09:23:15 +00:00
|
|
|
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
|
2020-11-04 16:32:25 +00:00
|
|
|
with:
|
|
|
|
java-version: 1.8
|
2020-11-05 09:23:15 +00:00
|
|
|
|
|
|
|
- name: Cache Maven packages
|
|
|
|
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
|
|
|
|
uses: actions/cache@v2
|
2020-11-04 16:32:25 +00:00
|
|
|
with:
|
2020-11-10 09:40:06 +00:00
|
|
|
path: ~/.m2/repository
|
|
|
|
key: cache-1-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
|
|
restore-keys: cache-1-${{ runner.os }}-m2
|
|
|
|
|
|
|
|
- name: Cleanup org.keycloak artifacts
|
|
|
|
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
|
|
|
|
run: rm -rf ~/.m2/repository/org/keycloak >/dev/null || true
|
2020-11-05 14:35:47 +00:00
|
|
|
|
|
|
|
- name: Download built keycloak
|
|
|
|
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
|
|
|
|
id: download-keycloak
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
2020-11-10 09:40:06 +00:00
|
|
|
path: ~/.m2/repository/org/keycloak/
|
2020-11-05 14:35:47 +00:00
|
|
|
name: keycloak-artifacts.zip
|
2020-11-05 09:23:15 +00:00
|
|
|
|
|
|
|
- name: Run tests
|
2020-11-04 16:32:25 +00:00
|
|
|
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
|
2020-11-05 09:23:15 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2020-11-10 09:40:06 +00:00
|
|
|
echo '::group::Compiling testsuite'
|
2020-11-05 14:35:47 +00:00
|
|
|
mvn clean install -B -nsu -Pauth-servers-crossdc-jboss,auth-server-wildfly,cache-server-infinispan,app-server-wildfly -DskipTests
|
2020-11-10 09:40:06 +00:00
|
|
|
echo '::endgroup::'
|
2020-11-05 14:35:47 +00:00
|
|
|
mvn clean install -B -nsu -f testsuite/integration-arquillian/tests/base/pom.xml -Pcache-server-infinispan,auth-servers-crossdc-jboss,auth-server-wildfly "-Dtest=org.keycloak.testsuite.crossdc.**.*,org.keycloak.testsuite.adapter.**.crossdc.**.*" | misc/log/trimmer.sh
|
|
|
|
TEST_RESULT=${PIPESTATUS[0]}
|
2020-11-13 07:46:30 +00:00
|
|
|
find . -path '*/target/surefire-reports/*.xml' | zip -q reports-cross-dc-tests.zip -@
|
2020-11-05 14:35:47 +00:00
|
|
|
exit $TEST_RESULT
|
|
|
|
|
|
|
|
- name: Cross-DC test reports
|
|
|
|
if: failure()
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2020-11-13 07:46:30 +00:00
|
|
|
name: reports-cross-dc-tests
|
2020-11-05 14:35:47 +00:00
|
|
|
retention-days: 14
|
|
|
|
path: reports-cross-dc-tests.zip
|
2020-11-10 09:40:06 +00:00
|
|
|
if-no-files-found: ignore
|
2020-11-04 16:32:25 +00:00
|
|
|
|
2020-06-22 20:23:40 +00:00
|
|
|
test-undertow-map:
|
|
|
|
name: Test undertow - map provider
|
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
MAVEN_OPTS: -Xmx2048m
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-11-05 09:23:15 +00:00
|
|
|
|
|
|
|
- name: Cache Maven packages
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
2020-11-10 09:40:06 +00:00
|
|
|
path: ~/.m2/repository
|
|
|
|
key: cache-1-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
|
|
restore-keys: cache-1-${{ runner.os }}-m2
|
|
|
|
|
|
|
|
- name: Cleanup org.keycloak artifacts
|
|
|
|
run: rm -rf ~/.m2/repository/org/keycloak >/dev/null || true
|
2020-11-05 14:35:47 +00:00
|
|
|
|
|
|
|
- name: Download built keycloak
|
|
|
|
id: download-keycloak
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
2020-11-10 09:40:06 +00:00
|
|
|
path: ~/.m2/repository/org/keycloak/
|
2020-11-05 14:35:47 +00:00
|
|
|
name: keycloak-artifacts.zip
|
2020-11-05 09:23:15 +00:00
|
|
|
|
2020-06-22 20:23:40 +00:00
|
|
|
- uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 1.8
|
2020-11-05 09:23:15 +00:00
|
|
|
|
2020-06-22 20:23:40 +00:00
|
|
|
- name: Run base tests - undertow
|
2020-11-05 09:23:15 +00:00
|
|
|
run: |
|
2020-11-10 09:40:06 +00:00
|
|
|
echo '::group::Compiling testsuite'
|
2020-11-05 14:35:47 +00:00
|
|
|
mvn clean install -nsu -B -DskipTests -f testsuite/pom.xml
|
2020-11-10 09:40:06 +00:00
|
|
|
echo '::endgroup::'
|
2020-11-05 14:35:47 +00:00
|
|
|
mvn clean install -nsu -B -f testsuite/integration-arquillian/tests/base/pom.xml -Dkeycloak.client.provider=map -Dkeycloak.group.provider=map -Dkeycloak.role.provider=map | misc/log/trimmer.sh
|
|
|
|
TEST_RESULT=${PIPESTATUS[0]}
|
2020-11-13 07:46:30 +00:00
|
|
|
find . -path '*/target/surefire-reports/*.xml' | zip -q reports-base-undertow-tests.zip -@
|
2020-11-05 14:35:47 +00:00
|
|
|
exit $TEST_RESULT
|
|
|
|
|
|
|
|
- name: Base test - undertow reports
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
if: failure()
|
|
|
|
with:
|
2020-11-13 07:46:30 +00:00
|
|
|
name: reports-base-undertow-tests
|
2020-11-05 14:35:47 +00:00
|
|
|
retention-days: 14
|
|
|
|
path: reports-base-undertow-tests.zip
|
2020-11-10 09:40:06 +00:00
|
|
|
if-no-files-found: ignore
|
2020-11-05 14:35:47 +00:00
|
|
|
|
|
|
|
### Tests: Quarkus distribution
|
|
|
|
|
|
|
|
quarkus-test:
|
|
|
|
name: Quarkus Test
|
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
MAVEN_OPTS: -Xmx2048m
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Cache Maven packages
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
2020-11-10 09:40:06 +00:00
|
|
|
path: ~/.m2/repository
|
|
|
|
key: cache-1-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
|
|
restore-keys: cache-1-${{ runner.os }}-m2
|
2020-11-05 14:35:47 +00:00
|
|
|
|
|
|
|
- uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 1.8
|
|
|
|
|
2020-11-10 09:40:06 +00:00
|
|
|
- name: Download built keycloak
|
|
|
|
id: download-keycloak
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
path: ~/.m2/repository/org/keycloak/
|
|
|
|
name: keycloak-artifacts.zip
|
|
|
|
|
|
|
|
- name: Run Quarkus tests
|
2020-11-05 14:35:47 +00:00
|
|
|
run: |
|
2020-11-10 09:40:06 +00:00
|
|
|
echo '::group::Compiling testsuite'
|
2020-11-12 13:42:51 +00:00
|
|
|
mvn clean install -nsu -B -Pauth-server-quarkus -DskipTests -f testsuite/pom.xml
|
2020-11-10 09:40:06 +00:00
|
|
|
echo '::endgroup::'
|
2020-11-12 13:42:51 +00:00
|
|
|
mvn clean install -nsu -B -Pauth-server-quarkus -f testsuite/integration-arquillian/tests/base/pom.xml -Dtest='!org.keycloak.testsuite.adapter.**,!**.crossdc.**,!**.cluster.**' | misc/log/trimmer.sh
|
2020-11-05 14:35:47 +00:00
|
|
|
TEST_RESULT=${PIPESTATUS[0]}
|
2020-11-13 07:46:30 +00:00
|
|
|
find . -path '*/target/surefire-reports/*.xml' | zip -q reports-quarkus-base-unit-tests.zip -@
|
2020-11-05 14:35:47 +00:00
|
|
|
exit $TEST_RESULT
|
|
|
|
|
2020-11-10 09:40:06 +00:00
|
|
|
- name: Quarkus base / unit test reports
|
2020-11-05 14:35:47 +00:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
if: failure()
|
|
|
|
with:
|
2020-11-13 07:46:30 +00:00
|
|
|
name: reports-quarkus-base-unit-tests
|
2020-11-05 14:35:47 +00:00
|
|
|
retention-days: 14
|
2020-11-10 09:40:06 +00:00
|
|
|
path: reports-quarkus-base-unit-tests.zip
|
|
|
|
if-no-files-found: ignore
|
2020-11-05 14:35:47 +00:00
|
|
|
|
|
|
|
quarkus-test-adapter:
|
|
|
|
name: Quarkus Test Adapter
|
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
MAVEN_OPTS: -Xmx1024m
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Cache Maven packages
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
2020-11-10 09:40:06 +00:00
|
|
|
path: ~/.m2/repository
|
|
|
|
key: cache-1-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
|
|
restore-keys: cache-1-${{ runner.os }}-m2
|
|
|
|
- name: Cleanup org.keycloak artifacts
|
|
|
|
run: rm -rf ~/.m2/repository/org/keycloak >/dev/null || true
|
|
|
|
|
2020-11-05 14:35:47 +00:00
|
|
|
- name: Download built keycloak
|
|
|
|
id: download-keycloak
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
2020-11-10 09:40:06 +00:00
|
|
|
path: ~/.m2/repository/org/keycloak/
|
2020-11-05 14:35:47 +00:00
|
|
|
name: keycloak-artifacts.zip
|
|
|
|
- uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 1.8
|
2020-11-10 09:40:06 +00:00
|
|
|
- name: Run Quarkus adapter tests
|
2020-11-05 14:35:47 +00:00
|
|
|
run: |
|
2020-11-10 09:40:06 +00:00
|
|
|
echo '::group::Compiling testsuite'
|
2020-11-12 13:42:51 +00:00
|
|
|
mvn clean install -nsu -B -Pauth-server-quarkus -DskipTests -f testsuite/pom.xml
|
2020-11-10 09:40:06 +00:00
|
|
|
echo '::endgroup::'
|
2020-11-12 13:42:51 +00:00
|
|
|
mvn clean install -nsu -B -Pauth-server-quarkus -f testsuite/integration-arquillian/tests/base/pom.xml -Dtest=org.keycloak.testsuite.adapter.** | misc/log/trimmer.sh
|
2020-11-05 14:35:47 +00:00
|
|
|
TEST_RESULT=${PIPESTATUS[0]}
|
2020-11-13 07:46:30 +00:00
|
|
|
find . -path '*/target/surefire-reports/*.xml' | zip -q reports-quarkus-adapter-tests.zip -@
|
2020-11-05 14:35:47 +00:00
|
|
|
exit $TEST_RESULT
|
|
|
|
|
2020-11-10 09:40:06 +00:00
|
|
|
- name: Quarkus adapter test reports
|
2020-11-05 14:35:47 +00:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
if: failure()
|
|
|
|
with:
|
2020-11-13 07:46:30 +00:00
|
|
|
name: reports-quarkus-adapter-tests
|
2020-11-05 14:35:47 +00:00
|
|
|
retention-days: 14
|
2020-11-10 09:40:06 +00:00
|
|
|
path: reports-quarkus-adapter-tests.zip
|
|
|
|
if-no-files-found: ignore
|
2020-11-05 14:35:47 +00:00
|
|
|
|
|
|
|
quarkus-test-cluster:
|
|
|
|
name: Quarkus Test Clustering
|
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
MAVEN_OPTS: -Xmx2048m
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Cache Maven packages
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
2020-11-10 09:40:06 +00:00
|
|
|
path: ~/.m2/repository
|
|
|
|
key: cache-1-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
|
|
restore-keys: cache-1-${{ runner.os }}-m2
|
|
|
|
- name: Cleanup org.keycloak artifacts
|
|
|
|
run: rm -rf ~/.m2/repository/org/keycloak >/dev/null || true
|
|
|
|
|
2020-11-05 14:35:47 +00:00
|
|
|
- name: Download built keycloak
|
|
|
|
id: download-keycloak
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
2020-11-10 09:40:06 +00:00
|
|
|
path: ~/.m2/repository/org/keycloak/
|
2020-11-05 14:35:47 +00:00
|
|
|
name: keycloak-artifacts.zip
|
|
|
|
- uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 1.8
|
2020-11-10 09:40:06 +00:00
|
|
|
- name: Run Quarkus cluster tests
|
2020-11-05 14:35:47 +00:00
|
|
|
run: |
|
2020-11-10 09:40:06 +00:00
|
|
|
echo '::group::Compiling testsuite'
|
2020-11-12 13:42:51 +00:00
|
|
|
mvn clean install -nsu -B -Pauth-server-quarkus -DskipTests -f testsuite/pom.xml
|
2020-11-10 09:40:06 +00:00
|
|
|
echo '::endgroup::'
|
2020-11-05 14:35:47 +00:00
|
|
|
mvn clean install -nsu -B -Pauth-server-cluster-quarkus -Dsession.cache.owners=2 -Dtest=**.cluster.** -f testsuite/integration-arquillian/pom.xml | misc/log/trimmer.sh
|
|
|
|
TEST_RESULT=${PIPESTATUS[0]}
|
2020-11-13 07:46:30 +00:00
|
|
|
find . -path '*/target/surefire-reports/*.xml' | zip -q reports-quarkus-cluster-tests.zip -@
|
2020-11-05 14:35:47 +00:00
|
|
|
exit $TEST_RESULT
|
|
|
|
|
2020-11-10 09:40:06 +00:00
|
|
|
- name: Quarkus cluster test reports
|
2020-11-05 14:35:47 +00:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
if: failure()
|
|
|
|
with:
|
2020-11-13 07:46:30 +00:00
|
|
|
name: reports-quarkus-cluster-tests
|
2020-11-05 14:35:47 +00:00
|
|
|
retention-days: 14
|
2020-11-10 09:40:06 +00:00
|
|
|
path: reports-quarkus-cluster-tests.zip
|
|
|
|
if-no-files-found: ignore
|