diff --git a/.github/workflows/build_and_test_workflow.yml b/.github/workflows/build_and_test_workflow.yml index c5e5cf3b15c4..f61918a16f66 100644 --- a/.github/workflows/build_and_test_workflow.yml +++ b/.github/workflows/build_and_test_workflow.yml @@ -25,6 +25,8 @@ env: TEST_OPENSEARCH_TRANSPORT_PORT: 9403 TEST_OPENSEARCH_PORT: 9400 OSD_SNAPSHOT_SKIP_VERIFY_CHECKSUM: true + # Version 112.0.5615.0 + CHROME_VERSION: 1109208 jobs: build-lint-test: @@ -122,6 +124,7 @@ jobs: functional-tests: name: Run functional tests on ${{ matrix.name }} (ciGroup${{ matrix.group }}) strategy: + fail-fast: false matrix: os: [ubuntu-latest, windows-latest] group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] @@ -134,6 +137,22 @@ jobs: steps: - run: echo Running functional tests for ciGroup${{ matrix.group }} + - name: Setup Chrome + id: setup-chrome + uses: browser-actions/setup-chrome@v1 + with: + chrome-version: ${{ env.CHROME_VERSION }} + + - name: Set Chrome Path + if: matrix.os != 'windows-latest' + run: | + echo "TEST_BROWSER_BINARY_PATH=${{ steps.setup-chrome.outputs.chrome-path }}" >> $GITHUB_ENV + + - name: Set Chrome Path (Windows) + if: matrix.os == 'windows-latest' + run: | + echo "TEST_BROWSER_BINARY_PATH=${{ steps.setup-chrome.outputs.chrome-path }}" >> $env:GITHUB_ENV + - name: Configure git's autocrlf (Windows only) if: matrix.os == 'windows-latest' run: | diff --git a/scripts/upgrade_chromedriver.js b/scripts/upgrade_chromedriver.js index 224486bb9867..ee992706a1fc 100644 --- a/scripts/upgrade_chromedriver.js +++ b/scripts/upgrade_chromedriver.js @@ -25,17 +25,34 @@ const versionCheckCommands = []; switch (process.platform) { case 'win32': versionCheckCommands.push( - 'powershell "(Get-Item \\"$Env:Programfiles/Google/Chrome/Application/chrome.exe\\").VersionInfo.FileVersion"' + ...[ + ...(process.env.TEST_BROWSER_BINARY_PATH + ? [ + `powershell "(Get-Item \\"${process.env.TEST_BROWSER_BINARY_PATH}\\").VersionInfo.FileVersion"`, + ] + : []), + 'powershell "(Get-Item \\"$Env:Programfiles/Google/Chrome/Application/chrome.exe\\").VersionInfo.FileVersion"', + ] ); break; case 'darwin': versionCheckCommands.push( - '/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome --version' + ...[ + ...(process.env.TEST_BROWSER_BINARY_PATH + ? [`${process.env.TEST_BROWSER_BINARY_PATH} --version`] + : []), + '/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome --version', + ] ); break; default: + versionCheckCommands.push( + ...(process.env.TEST_BROWSER_BINARY_PATH + ? [`${process.env.TEST_BROWSER_BINARY_PATH} --version`] + : []) + ); versionCheckCommands.push( ...[ '/usr/bin',