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
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.m2/repository
|
|
|
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
|
|
restore-keys: ${{ runner.os }}-m2
|
|
|
|
- name: Build
|
2020-11-04 06:57:19 +00:00
|
|
|
run: mvn install -B -DskipTests -Pdistribution
|
2020-05-14 13:49:00 +00:00
|
|
|
- name: Tar Maven Repo
|
|
|
|
shell: bash
|
|
|
|
run: tar -czvf maven-repo.tgz -C ~ .m2/repository
|
|
|
|
- name: Persist Maven Repo
|
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
name: maven-repo
|
|
|
|
path: maven-repo.tgz
|
|
|
|
|
2020-11-04 06:57:19 +00:00
|
|
|
unit-tests:
|
|
|
|
name: Unit Tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
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
|
|
|
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
|
|
restore-keys: ${{ runner.os }}-m2
|
|
|
|
- name: Run unit tests
|
|
|
|
run: mvn install -B -DskipTestsuite -DskipExamples -f pom.xml
|
|
|
|
|
2020-05-14 13:49:00 +00:00
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 1.8
|
|
|
|
- name: Download Maven Repo
|
|
|
|
uses: actions/download-artifact@v1
|
|
|
|
with:
|
|
|
|
name: maven-repo
|
|
|
|
path: .
|
|
|
|
- name: Extract Maven Repo
|
|
|
|
shell: bash
|
|
|
|
run: tar -xzvf maven-repo.tgz -C ~
|
|
|
|
- name: Build testsuite
|
|
|
|
run: mvn clean install -B -Pauth-server-wildfly -DskipTests -f testsuite/pom.xml
|
|
|
|
- name: Run base tests
|
2020-11-04 06:57:19 +00:00
|
|
|
run: mvn install -B -Pauth-server-wildfly -f testsuite/integration-arquillian/tests/base/pom.xml | misc/log/trimmer.sh; exit ${PIPESTATUS[0]}
|
|
|
|
|
2020-11-04 16:32:25 +00:00
|
|
|
test-crossdc:
|
|
|
|
name: CrossDC Tests
|
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
MAVEN_OPTS: -Xmx1024m
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 2
|
|
|
|
- uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 1.8
|
|
|
|
- name: Download Maven Repo
|
|
|
|
uses: actions/download-artifact@v1
|
|
|
|
with:
|
|
|
|
name: maven-repo
|
|
|
|
path: .
|
|
|
|
- name: Extract Maven Repo
|
|
|
|
shell: bash
|
|
|
|
run: tar -xzvf maven-repo.tgz -C ~
|
|
|
|
- name: Build testsuite
|
|
|
|
run: mvn clean install -B -nsu -Pauth-servers-crossdc-jboss,auth-server-wildfly,cache-server-infinispan,app-server-wildfly -DskipTests
|
|
|
|
- name: Run git diff
|
|
|
|
run: echo "GIT_DIFF=$( git diff --name-only HEAD^ | egrep -ic 'crossdc|infinispan' )" >> $GITHUB_ENV;
|
|
|
|
- name: Run crossdc-server and crossdc-adapter tests
|
|
|
|
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
|
|
|
|
run: 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; exit ${PIPESTATUS[0]}
|
|
|
|
|
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
|
|
|
|
- uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 1.8
|
|
|
|
- name: Download Maven Repo
|
|
|
|
uses: actions/download-artifact@v1
|
|
|
|
with:
|
|
|
|
name: maven-repo
|
|
|
|
path: .
|
|
|
|
- name: Extract Maven Repo
|
|
|
|
shell: bash
|
|
|
|
run: tar -xzvf maven-repo.tgz -C ~
|
|
|
|
- name: Build testsuite
|
|
|
|
run: mvn clean install -B -DskipTests -f testsuite/pom.xml
|
|
|
|
- name: Run base tests - undertow
|
2020-11-04 06:57:19 +00:00
|
|
|
run: mvn install -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; exit ${PIPESTATUS[0]}
|