KEYCLOAK-16217 Fix compilation errors
This commit is contained in:
parent
f6fe88b587
commit
2fd6deaf63
1 changed files with 100 additions and 55 deletions
155
.github/workflows/ci.yml
vendored
155
.github/workflows/ci.yml
vendored
|
@ -17,13 +17,11 @@ jobs:
|
|||
with:
|
||||
path: |
|
||||
~/.m2/repository
|
||||
!~/.m2/repository/org/keycloak
|
||||
key: cache-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: cache-${{ runner.os }}-m2
|
||||
key: cache-1-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: cache-1-${{ runner.os }}-m2
|
||||
|
||||
- name: Build Keycloak
|
||||
run: |
|
||||
mvn clean install -nsu -B -e -DskipTests -Pquarkus,distribution
|
||||
run: mvn clean install -nsu -B -e -DskipTests -Pquarkus,distribution
|
||||
|
||||
- name: Store Keycloak artifacts
|
||||
id: store-keycloak
|
||||
|
@ -35,6 +33,10 @@ jobs:
|
|||
~/.m2/repository/org/keycloak
|
||||
!~/.m2/repository/org/keycloak/**/*.tar.gz
|
||||
|
||||
- name: Remove keycloak artifacts before caching
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: rm -rf ~/.m2/repository/org/keycloak
|
||||
|
||||
## Tests: Regular distribution
|
||||
|
||||
unit-tests:
|
||||
|
@ -50,12 +52,15 @@ jobs:
|
|||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: cache-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: cache-${{ runner.os }}-m2
|
||||
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
|
||||
- name: Download built keycloak
|
||||
id: download-keycloak
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: ~/.m2/repository/org/keycloak/
|
||||
name: keycloak-artifacts.zip
|
||||
- name: Run unit tests
|
||||
run: |
|
||||
|
@ -71,6 +76,7 @@ jobs:
|
|||
name: reports-unit-tests.zip
|
||||
retention-days: 14
|
||||
path: reports-unit-tests.zip
|
||||
if-no-files-found: ignore
|
||||
|
||||
test:
|
||||
name: Test
|
||||
|
@ -82,25 +88,31 @@ jobs:
|
|||
- name: Cache Maven packages
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.m2/repository
|
||||
!~/.m2/repository/org/keycloak
|
||||
key: cache-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: cache-${{ runner.os }}-m2
|
||||
path: ~/.m2/repository
|
||||
key: cache-1-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: cache-1-${{ runner.os }}-m2
|
||||
|
||||
- name: Download built keycloak
|
||||
id: download-keycloak
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: ~/.m2/repository/org/keycloak/
|
||||
name: keycloak-artifacts.zip
|
||||
|
||||
# - name: List M2 repo
|
||||
# run: |
|
||||
# find ~ -name *dist*.zip
|
||||
# ls -lR ~/.m2/repository
|
||||
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
|
||||
- name: Run base tests
|
||||
run: |
|
||||
echo '::group::Compiling testsuite'
|
||||
mvn clean install -nsu -B -Pauth-server-wildfly -DskipTests -f testsuite/pom.xml
|
||||
echo '::endgroup::'
|
||||
mvn clean install -nsu -B -Pauth-server-wildfly -f testsuite/integration-arquillian/tests/base/pom.xml | misc/log/trimmer.sh
|
||||
TEST_RESULT=${PIPESTATUS[0]}
|
||||
find . -path '*/target/surefire-reports/*.xml' | zip reports-base-tests.zip -@
|
||||
|
@ -113,6 +125,7 @@ jobs:
|
|||
name: reports-base-tests.zip
|
||||
retention-days: 14
|
||||
path: reports-base-tests.zip
|
||||
if-no-files-found: ignore
|
||||
|
||||
test-cluster:
|
||||
name: Test Clustering
|
||||
|
@ -128,17 +141,20 @@ jobs:
|
|||
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.m2/repository
|
||||
!~/.m2/repository/org/keycloak
|
||||
key: cache-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: cache-${{ runner.os }}-m2
|
||||
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
|
||||
|
||||
- name: Download built keycloak
|
||||
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
|
||||
id: download-keycloak
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: ~/.m2/repository/org/keycloak/
|
||||
name: keycloak-artifacts.zip
|
||||
|
||||
- uses: actions/setup-java@v1
|
||||
|
@ -161,6 +177,7 @@ jobs:
|
|||
name: reports-cluster-tests.zip
|
||||
retention-days: 14
|
||||
path: reports-cluster-tests.zip
|
||||
if-no-files-found: ignore
|
||||
|
||||
test-crossdc:
|
||||
name: Cross-DC Tests
|
||||
|
@ -185,24 +202,29 @@ jobs:
|
|||
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.m2/repository
|
||||
!~/.m2/repository/org/keycloak
|
||||
key: cache-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: cache-${{ runner.os }}-m2
|
||||
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
|
||||
|
||||
- name: Download built keycloak
|
||||
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
|
||||
id: download-keycloak
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: ~/.m2/repository/org/keycloak/
|
||||
name: keycloak-artifacts.zip
|
||||
|
||||
- name: Run tests
|
||||
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo '::group::Compiling testsuite'
|
||||
mvn clean install -B -nsu -Pauth-servers-crossdc-jboss,auth-server-wildfly,cache-server-infinispan,app-server-wildfly -DskipTests
|
||||
echo '::endgroup::'
|
||||
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]}
|
||||
find . -path '*/target/surefire-reports/*.xml' | zip reports-cross-dc-tests.zip -@
|
||||
|
@ -215,6 +237,7 @@ jobs:
|
|||
name: reports-cross-dc-tests.zip
|
||||
retention-days: 14
|
||||
path: reports-cross-dc-tests.zip
|
||||
if-no-files-found: ignore
|
||||
|
||||
test-undertow-map:
|
||||
name: Test undertow - map provider
|
||||
|
@ -228,16 +251,18 @@ jobs:
|
|||
- name: Cache Maven packages
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.m2/repository
|
||||
!~/.m2/repository/org/keycloak
|
||||
key: cache-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: cache-${{ runner.os }}-m2
|
||||
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
|
||||
|
||||
- name: Download built keycloak
|
||||
id: download-keycloak
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: ~/.m2/repository/org/keycloak/
|
||||
name: keycloak-artifacts.zip
|
||||
|
||||
- uses: actions/setup-java@v1
|
||||
|
@ -246,7 +271,9 @@ jobs:
|
|||
|
||||
- name: Run base tests - undertow
|
||||
run: |
|
||||
echo '::group::Compiling testsuite'
|
||||
mvn clean install -nsu -B -DskipTests -f testsuite/pom.xml
|
||||
echo '::endgroup::'
|
||||
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]}
|
||||
find . -path '*/target/surefire-reports/*.xml' | zip reports-base-undertow-tests.zip -@
|
||||
|
@ -259,6 +286,7 @@ jobs:
|
|||
name: reports-base-undertow-tests.zip
|
||||
retention-days: 14
|
||||
path: reports-base-undertow-tests.zip
|
||||
if-no-files-found: ignore
|
||||
|
||||
### Tests: Quarkus distribution
|
||||
|
||||
|
@ -274,32 +302,39 @@ jobs:
|
|||
- name: Cache Maven packages
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.m2/repository
|
||||
!~/.m2/repository/org/keycloak
|
||||
key: cache-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: cache-${{ runner.os }}-m2
|
||||
path: ~/.m2/repository
|
||||
key: cache-1-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: cache-1-${{ runner.os }}-m2
|
||||
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
|
||||
- name: Run Quarkus unit tests
|
||||
- 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
|
||||
run: |
|
||||
mvn install -nsu -B -Pquarkus -f quarkus/pom.xml
|
||||
echo '::group::Compiling testsuite'
|
||||
mvn clean install -nsu -B -Pquarkus,auth-server-quarkus -DskipTests -f testsuite/pom.xml
|
||||
echo '::endgroup::'
|
||||
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
|
||||
TEST_RESULT=${PIPESTATUS[0]}
|
||||
find . -path '*/target/surefire-reports/*.xml' | zip reports-base-unit-tests.zip -@
|
||||
exit $TEST_RESULT
|
||||
|
||||
- name: Base / unit test reports
|
||||
- name: Quarkus base / unit test reports
|
||||
uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
name: reports-base-unit-tests.zip
|
||||
name: reports-quarkus-base-unit-tests.zip
|
||||
retention-days: 14
|
||||
path: reports-base-unit-tests.zip
|
||||
path: reports-quarkus-base-unit-tests.zip
|
||||
if-no-files-found: ignore
|
||||
|
||||
quarkus-test-adapter:
|
||||
name: Quarkus Test Adapter
|
||||
|
@ -312,34 +347,39 @@ jobs:
|
|||
- name: Cache Maven packages
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.m2/repository
|
||||
!~/.m2/repository/org/keycloak
|
||||
key: cache-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: cache-${{ runner.os }}-m2
|
||||
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
|
||||
|
||||
- name: Download built keycloak
|
||||
id: download-keycloak
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: ~/.m2/repository/org/keycloak/
|
||||
name: keycloak-artifacts.zip
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Run adapter tests
|
||||
- name: Run Quarkus adapter tests
|
||||
run: |
|
||||
echo '::group::Compiling testsuite'
|
||||
mvn clean install -nsu -B -Pquarkus,auth-server-quarkus -DskipTests -f testsuite/pom.xml
|
||||
echo '::endgroup::'
|
||||
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
|
||||
TEST_RESULT=${PIPESTATUS[0]}
|
||||
find . -path '*/target/surefire-reports/*.xml' | zip reports-adapter-tests.zip -@
|
||||
exit $TEST_RESULT
|
||||
|
||||
- name: Adapter test reports
|
||||
- name: Quarkus adapter test reports
|
||||
uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
name: reports-adapter-tests.zip
|
||||
name: reports-quarkus-adapter-tests.zip
|
||||
retention-days: 14
|
||||
path: reports-adapter-tests.zip
|
||||
path: reports-quarkus-adapter-tests.zip
|
||||
if-no-files-found: ignore
|
||||
|
||||
quarkus-test-cluster:
|
||||
name: Quarkus Test Clustering
|
||||
|
@ -352,31 +392,36 @@ jobs:
|
|||
- name: Cache Maven packages
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.m2/repository
|
||||
!~/.m2/repository/org/keycloak
|
||||
key: cache-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: cache-${{ runner.os }}-m2
|
||||
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
|
||||
|
||||
- name: Download built keycloak
|
||||
id: download-keycloak
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: ~/.m2/repository/org/keycloak/
|
||||
name: keycloak-artifacts.zip
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Run cluster tests
|
||||
- name: Run Quarkus cluster tests
|
||||
run: |
|
||||
echo '::group::Compiling testsuite'
|
||||
mvn clean install -nsu -B -Pquarkus,auth-server-quarkus -DskipTests -f testsuite/pom.xml
|
||||
echo '::endgroup::'
|
||||
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]}
|
||||
find . -path '*/target/surefire-reports/*.xml' | zip reports-cluster-tests.zip -@
|
||||
exit $TEST_RESULT
|
||||
|
||||
- name: Cluster test reports
|
||||
- name: Quarkus cluster test reports
|
||||
uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
name: reports-cluster-tests.zip
|
||||
name: reports-quarkus-cluster-tests.zip
|
||||
retention-days: 14
|
||||
path: reports-cluster-tests.zip
|
||||
path: reports-quarkus-cluster-tests.zip
|
||||
if-no-files-found: ignore
|
||||
|
|
Loading…
Reference in a new issue