diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml index 818696d7d303da3..4fd8670ea8d6dd7 100644 --- a/.github/workflows/build_test_deploy.yml +++ b/.github/workflows/build_test_deploy.yml @@ -80,6 +80,7 @@ jobs: env: NEXT_TELEMETRY_DISABLED: 1 BROWSERSTACK: true + SKIP_LOCAL_SELENIUM_SERVER: true BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} steps: diff --git a/test/jest-environment.js b/test/jest-environment.js index fd5d8d640eac0b4..814798f9600d50a 100644 --- a/test/jest-environment.js +++ b/test/jest-environment.js @@ -4,7 +4,10 @@ const getPort = require('get-port') const seleniumServer = require('selenium-standalone') const NodeEnvironment = require('jest-environment-node') -const { BROWSER_NAME: browserName = 'chrome' } = process.env +const { + BROWSER_NAME: browserName = 'chrome', + SKIP_LOCAL_SELENIUM_SERVER, +} = process.env const newTabPg = ` @@ -38,7 +41,7 @@ class CustomEnvironment extends NodeEnvironment { let seleniumServerPort - if (browserName !== 'chrome') { + if (browserName !== 'chrome' && SKIP_LOCAL_SELENIUM_SERVER !== 'true') { console.log('Installing selenium server') await new Promise((resolve, reject) => { seleniumServer.install(err => {