diff --git a/.github/workflows/browser-test.yml b/.github/workflows/browser-test.yml index df0f7f90c4..a037f6cc56 100644 --- a/.github/workflows/browser-test.yml +++ b/.github/workflows/browser-test.yml @@ -12,12 +12,13 @@ jobs: runs-on: ubuntu-latest if: contains(github.event.pull_request.labels.*.name, 'run-browser-test') steps: - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: lts/* - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} + persist-credentials: false - name: 'Cache node_modules' uses: actions/cache@v3 with: diff --git a/.github/workflows/mocha.yml b/.github/workflows/mocha.yml index 54642c123a..ab063f88df 100644 --- a/.github/workflows/mocha.yml +++ b/.github/workflows/mocha.yml @@ -22,8 +22,10 @@ jobs: - name: Check event pull_request if: github.event_name == 'pull_request' run: 'echo pull_request: run workflow' - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 if: github.event_name == 'push' + with: + persist-credentials: false - name: Check event push id: findPr if: github.event_name == 'push' @@ -46,10 +48,11 @@ jobs: - 16 - 18 - 20 - - 21 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + with: + persist-credentials: false + - uses: actions/setup-node@v4 with: node-version: '${{ matrix.node }}' - run: npm install --production @@ -60,10 +63,12 @@ jobs: runs-on: ubuntu-latest needs: smoke steps: - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: lts/* - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + with: + persist-credentials: false - name: 'Cache node_modules' uses: actions/cache@v3 with: @@ -90,17 +95,18 @@ jobs: - 16 - 18 - 20 - - 21 include: - os: ubuntu-latest node: 16 env: COVERAGE: 1 steps: - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: '${{ matrix.node }}' - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + with: + persist-credentials: false - name: Get npm cache directory in Windows id: npm-cache if: ${{ matrix.os == 'windows-2019' }} @@ -111,8 +117,6 @@ jobs: with: path: ${{ matrix.os == 'ubuntu-latest' && '~/.npm' || steps.npm-cache.outputs.dir }} key: "${{ matrix.os }}-node-v${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}" - restore-keys: | - ${{ matrix.os }}-node-v${{ matrix.node }}- - name: Install Dependencies run: npm ci --ignore-scripts - name: Install Annotation Support @@ -141,19 +145,19 @@ jobs: # Don't run forked 'pull_request' without saucelabs token if: github.event_name == 'push' || !github.event.pull_request.head.repo.fork steps: - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: lts/* - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + with: + persist-credentials: false - name: 'Cache node_modules' uses: actions/cache@v3 with: path: '~/.npm' # this key is different than above, since we are running scripts # (builds, postinstall lifecycle hooks, etc.) - key: "ubuntu-latest-node-full-v16-${{ hashFiles('**/package-lock.json') }}" - restore-keys: | - ubuntu-latest-node-full-v16- + key: "ubuntu-latest-node-full-lts-${{ hashFiles('**/package-lock.json') }}" - name: Install Dependencies run: npm ci - name: Run Browser Tests diff --git a/karma.conf.js b/karma.conf.js index 03762aa142..ea56db757c 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -67,10 +67,6 @@ const baseConfig = { showDiff: true }, customLaunchers: { - FirefoxDebug: { - base: "Firefox", - "moz:debuggerAddress": true - }, ChromeDebug: { base: 'Chrome', flags: ['--remote-debugging-port=9333'] @@ -95,7 +91,6 @@ module.exports = config => { bundleDirPath = path.join(BASE_BUNDLE_DIR_PATH, buildId); sauceConfig = { build: buildId, - geckodriverVersion: '0.30.0' // temporary workaround for firefox }; } else { console.error(`Local environment (${hostname}) detected`); @@ -176,7 +171,7 @@ const addSauceTests = (cfg, sauceLabs) => { const customLaunchers = sauceBrowsers.reduce((acc, sauceBrowser) => { const platformName = SAUCE_BROWSER_PLATFORM_MAP[sauceBrowser]; const [browserName, browserVersion] = sauceBrowser.split('@'); - return { + const result = { ...acc, [sauceBrowser]: { base: 'SauceLabs', @@ -186,6 +181,10 @@ const addSauceTests = (cfg, sauceLabs) => { 'sauce:options': sauceLabs } }; + if (browserName === 'firefox') { + result[sauceBrowser]['moz:debuggerAddress'] = true; + } + return result; }, {}); return {