Add chrome install action in GHA to force a specific version of chrome

Closes #38817

Signed-off-by: rmartinc <rmartinc@redhat.com>
This commit is contained in:
rmartinc 2025-04-10 11:20:38 +02:00 committed by Marek Posolda
parent 42a5154ebe
commit 795636a6c7
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,30 @@
name: Install Chrome browser and driver for Testing
description: Download and install the compatible Chrome and Chromedriver
inputs:
version:
description: The version of Chrome and Chromedriver to install.
required: false
default: 134.0.6998.165 # Ensures compatibility with the testsuite
runs:
using: composite
steps:
# Cannot use Chrome for Testing. Acts weirdly and would probably require some changes in the testsuite.
- id: install-chrome
name: Install Chrome
shell: bash
run: |
sudo apt-get remove google-chrome-stable
wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${{ inputs.version }}-1_amd64.deb -O /tmp/google-chrome-stable.deb --no-verbose
sudo apt-get install -y /tmp/google-chrome-stable.deb
- id: install-chromedriver
name: Install Chromedriver
shell: bash
run: |
wget https://storage.googleapis.com/chrome-for-testing-public/${{ inputs.version }}/linux64/chromedriver-linux64.zip -O /tmp/chromedriver.zip --no-verbose
unzip -j /tmp/chromedriver.zip -d /tmp
sudo mv -f /tmp/chromedriver $CHROMEWEBDRIVER/chromedriver
sudo chmod +x $CHROMEWEBDRIVER/chromedriver

View File

@ -116,6 +116,8 @@ jobs:
name: Integration test setup
uses: ./.github/actions/integration-test-setup
- uses: ./.github/actions/install-chrome
- name: Run base tests
run: |
TESTS=`testsuite/integration-arquillian/tests/base/testsuites/base-suite.sh ${{ matrix.group }}`
@ -157,6 +159,8 @@ jobs:
- name: Build app servers
run: ./mvnw install -DskipTests -Pbuild-app-servers -f testsuite/integration-arquillian/servers/app-server/pom.xml
- uses: ./.github/actions/install-chrome
- name: Run adapter tests
run: |
TESTS="org.keycloak.testsuite.adapter.**"
@ -902,6 +906,9 @@ jobs:
name: Integration test setup
uses: ./.github/actions/integration-test-setup
- uses: ./.github/actions/install-chrome
if: matrix.browser == 'chrome'
- name: Run Forms IT
run: |
TESTS=`testsuite/integration-arquillian/tests/base/testsuites/suite.sh forms`
@ -944,6 +951,9 @@ jobs:
name: Integration test setup
uses: ./.github/actions/integration-test-setup
- uses: ./.github/actions/install-chrome
if: matrix.browser == 'chrome'
- name: Run WebAuthn IT
run: |
TESTS=`testsuite/integration-arquillian/tests/base/testsuites/suite.sh webauthn`