Disable WebAuthn tests in GH Actions (#13880)

This commit is contained in:
Martin Bartoš 2022-08-19 09:59:17 -04:00 committed by GitHub
parent 2a2ada9575
commit f3a36eaad5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -510,61 +510,63 @@ jobs:
test-logs test-logs
keycloak.log keycloak.log
webauthn-test: # NOTE: WebAuthn tests can be enabled once the issue #12621 is resolved
name: WebAuthn Tests #
needs: build # webauthn-test:
runs-on: ubuntu-latest # name: WebAuthn Tests
steps: # needs: build
- uses: actions/checkout@v2 # runs-on: ubuntu-latest
with: # steps:
fetch-depth: 2 # - uses: actions/checkout@v2
# with:
- name: Check whether this phase should run # fetch-depth: 2
run: echo "GIT_DIFF=$[ $( git diff --name-only HEAD^ | egrep -ic 'webauthn|passwordless' ) ]" >> $GITHUB_ENV #
# - name: Check whether this phase should run
- uses: actions/setup-java@v1 # run: echo "GIT_DIFF=$[ $( git diff --name-only HEAD^ | egrep -ic 'webauthn|passwordless' ) ]" >> $GITHUB_ENV
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }} #
with: # - uses: actions/setup-java@v1
java-version: ${{ env.DEFAULT_JDK_VERSION }} # if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
# with:
- name: Update maven settings # java-version: ${{ env.DEFAULT_JDK_VERSION }}
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }} #
run: mkdir -p ~/.m2 ; cp .github/settings.xml ~/.m2/ # - name: Update maven settings
# if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
- name: Cache Maven packages # run: mkdir -p ~/.m2 ; cp .github/settings.xml ~/.m2/
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }} #
uses: actions/cache@v2 # - name: Cache Maven packages
with: # if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
path: ~/.m2/repository # uses: actions/cache@v2
key: cache-1-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} # with:
restore-keys: cache-1-${{ runner.os }}-m2 # path: ~/.m2/repository
# key: cache-1-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- name: Cleanup org.keycloak artifacts # restore-keys: cache-1-${{ runner.os }}-m2
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }} #
run: rm -rf ~/.m2/repository/org/keycloak >/dev/null || true # - name: Cleanup org.keycloak artifacts
# if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
- name: Download built keycloak # run: rm -rf ~/.m2/repository/org/keycloak >/dev/null || true
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }} #
id: download-keycloak # - name: Download built keycloak
uses: actions/download-artifact@v2 # if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
with: # id: download-keycloak
path: ~/.m2/repository/org/keycloak/ # uses: actions/download-artifact@v2
name: keycloak-artifacts.zip # with:
# path: ~/.m2/repository/org/keycloak/
- name: Run WebAuthn tests # name: keycloak-artifacts.zip
if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }} #
run: | # - name: Run WebAuthn tests
mvn clean install -nsu -B -Dbrowser=chrome -Pwebauthn -f testsuite/integration-arquillian/tests/other/pom.xml -Dtest=org.keycloak.testsuite.webauthn.**.*Test | misc/log/trimmer.sh # if: ${{ github.event_name != 'pull_request' || env.GIT_DIFF != 0 }}
# run: |
TEST_RESULT=${PIPESTATUS[0]} # mvn clean install -nsu -B -Dbrowser=chrome -Pwebauthn -f testsuite/integration-arquillian/tests/other/pom.xml -Dtest=org.keycloak.testsuite.webauthn.**.*Test | misc/log/trimmer.sh
find . -path '*/target/surefire-reports/*.xml' | zip -q reports-webauthn-tests.zip -@ #
exit $TEST_RESULT # TEST_RESULT=${PIPESTATUS[0]}
# find . -path '*/target/surefire-reports/*.xml' | zip -q reports-webauthn-tests.zip -@
- name: WebAuthn test reports # exit $TEST_RESULT
uses: actions/upload-artifact@v2 #
if: failure() # - name: WebAuthn test reports
with: # uses: actions/upload-artifact@v2
name: reports-webauthn-tests # if: failure()
retention-days: 14 # with:
path: reports-webauthn-tests.zip # name: reports-webauthn-tests
if-no-files-found: ignore # retention-days: 14
# path: reports-webauthn-tests.zip
# if-no-files-found: ignore