2021-05-09 19:15:45 +02:00
|
|
|
name: Build and test
|
2021-05-07 23:50:44 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
2021-12-11 18:30:28 +01:00
|
|
|
paths:
|
|
|
|
- 'src/**'
|
|
|
|
- '*.xml'
|
2021-05-07 23:50:44 +02:00
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up JDK 11
|
2021-09-19 19:55:47 +02:00
|
|
|
uses: actions/setup-java@v2
|
2021-05-07 23:50:44 +02:00
|
|
|
with:
|
2021-09-19 19:55:47 +02:00
|
|
|
distribution: 'adopt'
|
2021-05-07 23:50:44 +02:00
|
|
|
java-version: 11
|
|
|
|
- name: Cache maven repository
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.m2/repository
|
|
|
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-maven-
|
2021-09-19 19:55:47 +02:00
|
|
|
- name: Build
|
2021-05-09 19:15:45 +02:00
|
|
|
run: mvn -B clean package --file pom.xml
|
2021-09-19 20:13:38 +02:00
|
|
|
- name: Integration test
|
2021-09-19 19:55:47 +02:00
|
|
|
run: mvn -B failsafe:integration-test failsafe:verify --file pom.xml
|
2021-09-19 20:13:38 +02:00
|
|
|
compatibility:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
2021-09-19 20:25:17 +02:00
|
|
|
fail-fast: false
|
2021-09-19 20:13:38 +02:00
|
|
|
matrix:
|
2021-12-18 13:04:33 +01:00
|
|
|
keycloak_version: [ 13.0.1, 14.0.0, 15.0.2, 15.1.1, 16.0.0, latest ]
|
2021-10-29 09:34:11 +02:00
|
|
|
keycloak_dist: [keycloak, keycloak-x]
|
2021-09-19 20:13:38 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up JDK 11
|
|
|
|
uses: actions/setup-java@v2
|
|
|
|
with:
|
|
|
|
distribution: 'adopt'
|
|
|
|
java-version: 11
|
|
|
|
- name: Cache maven repository
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.m2/repository
|
|
|
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-maven-
|
|
|
|
- name: Compatibility tests
|
2021-11-03 23:17:15 +01:00
|
|
|
run: mvn -B -U clean test-compile failsafe:integration-test failsafe:verify --file pom.xml -Dkeycloak.version=${{ matrix.keycloak_version }} -Dkeycloak.dist=${{ matrix.keycloak_dist }}
|