KEYCLOAK-17743 Run QS tests with each PR in the Keycloak repo
This commit is contained in:
parent
c2c1b482ea
commit
f2c08e9b8f
2 changed files with 66 additions and 0 deletions
11
.github/scripts/quickstarts/prepare-server.sh
vendored
Executable file
11
.github/scripts/quickstarts/prepare-server.sh
vendored
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec -f keycloak)
|
||||||
|
|
||||||
|
unzip ~/.m2/repository/org/keycloak/keycloak-server-dist/${VERSION}/keycloak-server-dist-${VERSION}.zip
|
||||||
|
mv keycloak-${VERSION} keycloak-dist
|
||||||
|
|
||||||
|
keycloak-dist/bin/add-user-keycloak.sh -u admin -p admin
|
||||||
|
|
||||||
|
# update QS version to match KC version
|
||||||
|
mvn versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false -DgroupId=org.keycloak* -DartifactId=* -Pbump-version -B
|
55
.github/workflows/ci.yml
vendored
55
.github/workflows/ci.yml
vendored
|
@ -341,3 +341,58 @@ jobs:
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
path: reports-quarkus-cluster-tests.zip
|
path: reports-quarkus-cluster-tests.zip
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
|
|
||||||
|
quickstarts-tests:
|
||||||
|
name: Quickstarts Tests
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
repository: keycloak/keycloak-quickstarts
|
||||||
|
ref: master # default is "latest"
|
||||||
|
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: keycloak
|
||||||
|
|
||||||
|
- uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 1.8
|
||||||
|
|
||||||
|
- name: Cache Maven packages
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
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
|
||||||
|
|
||||||
|
- name: Prepare Keycloak
|
||||||
|
run: keycloak/.github/scripts/quickstarts/prepare-server.sh
|
||||||
|
|
||||||
|
- name: Build Quickstarts
|
||||||
|
run: .github/scripts/build-quickstarts.sh
|
||||||
|
|
||||||
|
- name: Start Keycloak
|
||||||
|
run: .github/scripts/start-local-server.sh
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: .github/scripts/run-tests.sh
|
||||||
|
|
||||||
|
- name: Archive logs
|
||||||
|
if: ${{ always() }}
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: quickstarts-test-logs
|
||||||
|
retention-days: 2
|
||||||
|
path: |
|
||||||
|
test-logs
|
||||||
|
keycloak.log
|
Loading…
Reference in a new issue