KEYCLOAK-16144 Added unit tests to GA

This commit is contained in:
stianst 2020-11-04 07:57:19 +01:00 committed by Hynek Mlnařík
parent bc6bb22173
commit a43d0a9dbd

View file

@ -18,7 +18,7 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2 restore-keys: ${{ runner.os }}-m2
- name: Build - name: Build
run: mvn clean install -B -DskipTests -Pdistribution run: mvn install -B -DskipTests -Pdistribution
- name: Tar Maven Repo - name: Tar Maven Repo
shell: bash shell: bash
run: tar -czvf maven-repo.tgz -C ~ .m2/repository run: tar -czvf maven-repo.tgz -C ~ .m2/repository
@ -28,6 +28,23 @@ jobs:
name: maven-repo name: maven-repo
path: maven-repo.tgz path: maven-repo.tgz
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
test: test:
name: Test name: Test
needs: build needs: build
@ -48,7 +65,8 @@ jobs:
- name: Build testsuite - name: Build testsuite
run: mvn clean install -B -Pauth-server-wildfly -DskipTests -f testsuite/pom.xml run: mvn clean install -B -Pauth-server-wildfly -DskipTests -f testsuite/pom.xml
- name: Run base tests - name: Run base tests
run: mvn clean install -B -Pauth-server-wildfly -f testsuite/integration-arquillian/tests/base/pom.xml | misc/log/trimmer.sh; exit ${PIPESTATUS[0]} run: mvn install -B -Pauth-server-wildfly -f testsuite/integration-arquillian/tests/base/pom.xml | misc/log/trimmer.sh; exit ${PIPESTATUS[0]}
test-adapter: test-adapter:
name: Test Adapter name: Test Adapter
needs: build needs: build
@ -71,7 +89,8 @@ jobs:
- name: Build testsuite - name: Build testsuite
run: mvn clean install -B -nsu -Pauth-server-wildfly -DskipTests -f testsuite/integration-arquillian/pom.xml run: mvn clean install -B -nsu -Pauth-server-wildfly -DskipTests -f testsuite/integration-arquillian/pom.xml
- name: Run adapter tests - name: Run adapter tests
run: mvn clean install -B -nsu -Pauth-server-wildfly -f testsuite/integration-arquillian/tests/base/pom.xml "-Dtest=org.keycloak.testsuite.adapter.**.*Test,!org.keycloak.testsuite.adapter.**.authorization**.*Test" | misc/log/trimmer.sh; exit ${PIPESTATUS[0]} run: mvn install -B -nsu -Pauth-server-wildfly -f testsuite/integration-arquillian/tests/base/pom.xml "-Dtest=org.keycloak.testsuite.adapter.**.*Test,!org.keycloak.testsuite.adapter.**.authorization**.*Test" | misc/log/trimmer.sh; exit ${PIPESTATUS[0]}
test-undertow-map: test-undertow-map:
name: Test undertow - map provider name: Test undertow - map provider
needs: build needs: build
@ -94,4 +113,4 @@ jobs:
- name: Build testsuite - name: Build testsuite
run: mvn clean install -B -DskipTests -f testsuite/pom.xml run: mvn clean install -B -DskipTests -f testsuite/pom.xml
- name: Run base tests - undertow - name: Run base tests - undertow
run: mvn clean 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]} 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]}