104 lines
3.4 KiB
YAML
104 lines
3.4 KiB
YAML
name: Keycloak.X 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
|
|
id: cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.m2/repository
|
|
!~/.m2/repository/org/keycloak
|
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
restore-keys: ${{ runner.os }}-m2
|
|
- name: Build cache
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
run: |
|
|
mvn clean install -nsu -B -e -DskipTests -Pquarkus,distribution
|
|
|
|
test:
|
|
name: 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:
|
|
path: |
|
|
~/.m2/repository
|
|
!~/.m2/repository/org/keycloak
|
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
restore-keys: ${{ runner.os }}-m2
|
|
|
|
- uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 1.8
|
|
|
|
- name: Run Quarkus unit tests
|
|
run: |
|
|
mvn clean install -nsu -B -Pquarkus -f quarkus/pom.xml
|
|
mvn clean install -nsu -B -Pquarkus,auth-server-quarkus -DskipTests -f testsuite/pom.xml
|
|
mvn clean install -nsu -B -Pquarkus,auth-server-quarkus -f testsuite/integration-arquillian/tests/base/pom.xml -Dtest='!org.keycloak.testsuite.adapter.**,!**.crossdc.**,!**.cluster.**' | misc/log/trimmer.sh
|
|
exit ${PIPESTATUS[0]}
|
|
|
|
test-adapter:
|
|
name: 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:
|
|
path: |
|
|
~/.m2/repository
|
|
!~/.m2/repository/org/keycloak
|
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
restore-keys: ${{ runner.os }}-m2
|
|
- uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 1.8
|
|
- name: Run adapter tests
|
|
run: |
|
|
mvn clean install -nsu -B -Pquarkus,auth-server-quarkus -DskipTests -f testsuite/pom.xml
|
|
mvn clean install -nsu -B -Pquarkus,auth-server-quarkus -f testsuite/integration-arquillian/tests/base/pom.xml -Dtest=org.keycloak.testsuite.adapter.** | misc/log/trimmer.sh
|
|
exit ${PIPESTATUS[0]}
|
|
test-cluster:
|
|
name: 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:
|
|
path: |
|
|
~/.m2/repository
|
|
!~/.m2/repository/org/keycloak
|
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
restore-keys: ${{ runner.os }}-m2
|
|
- uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 1.8
|
|
- name: Run cluster tests
|
|
run: |
|
|
mvn clean install -nsu -B -Pquarkus,auth-server-quarkus -DskipTests -f testsuite/pom.xml
|
|
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
|
|
exit ${PIPESTATUS[0]}
|