From 7f0013c386b4613949a7e911cdc361d00744443e Mon Sep 17 00:00:00 2001 From: gpoitch <411908+gpoitch@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:33:35 -0500 Subject: [PATCH] Update CI (#793) --- .github/workflows/ci.yml | 18 ++++++---- testem-ci.js | 73 +++++++++++++++++++--------------------- 2 files changed, 45 insertions(+), 46 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f2edf780..1aba30732 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,15 +9,19 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Use Node.js - uses: actions/setup-node@v3 - with: { node-version: 16 } - - run: yarn install + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + + - name: Install dependencies + run: npm ci + - name: Run headless test - uses: GabrielBB/xvfb-action@v1 + uses: coactions/setup-xvfb@v1 env: SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} with: - run: yarn test:ci + run: npm run test:ci diff --git a/testem-ci.js b/testem-ci.js index 73b1603ca..08fda914b 100644 --- a/testem-ci.js +++ b/testem-ci.js @@ -1,44 +1,39 @@ /* eslint-env node */ module.exports = { - "framework": "qunit", - "parallel": 5, - "disable_watching": true, - "timeout": 600, - "browser_start_timeout": 90, - "test_page": "tests/index.html?hidepassed", - "on_start": "./sauce_labs/saucie-connect.js", - "on_exit": "./sauce_labs/saucie-disconnect.js", - "port": 8080, - "launchers": { - "SL_Chrome_Current": { - "exe": "saucie", - "args": ["-b", "chrome", "-p", "Windows 10", "-v", "latest", "--no-connect", "-u"], - "protocol": "tap" + framework: 'qunit', + parallel: 5, + disable_watching: true, + timeout: 600, + browser_start_timeout: 90, + test_page: 'tests/index.html?hidepassed', + on_start: './sauce_labs/saucie-connect.js', + on_exit: './sauce_labs/saucie-disconnect.js', + port: 8080, + launchers: { + SL_Chrome_Current: { + exe: 'saucie', + args: ['-b', 'chrome', '-p', 'Windows 10', '-v', 'latest', '--no-connect', '-u'], + protocol: 'tap', }, - "SL_MS_Edge": { - "exe": "saucie", - "args": ["-b", "microsoftedge", "-v", "latest", "--no-connect", "-u"], - "protocol": "tap" + SL_MS_Edge: { + exe: 'saucie', + args: ['-b', 'microsoftedge', '-v', 'latest', '--no-connect', '-u'], + protocol: 'tap', }, - "SL_Safari_Current": { - "exe": "saucie", - "args": ["-b", "safari", "-v", "latest", "--no-connect", "-u"], - "protocol": "tap" - } + SL_Safari_Current: { + exe: 'saucie', + args: ['-b', 'safari', '-v', 'latest', '--no-connect', '-u'], + protocol: 'tap', + }, + }, + launch_in_ci: ['Chrome', 'Firefox', ...(process.env.SAUCE_ACCESS_KEY ? ['SL_Safari_Current', 'SL_MS_Edge'] : [])], // eslint-disable-line no-process-env + browser_args: { + Chrome: [ + '--no-sandbox', // Fixes issue starting ChromeHeadless, see https://github.com/travis-ci/travis-ci/issues/9024 + '--disable-gpu', + '--headless', + '--remote-debugging-port=9222', + '--window-size=1440,900', + ], }, - "launch_in_ci": [ - "Chrome", - "Firefox", - "SL_Safari_Current", - "SL_MS_Edge" - ], - "browser_args": { - "Chrome": [ - "--no-sandbox", // Fixes issue starting ChromeHeadless, see https://github.com/travis-ci/travis-ci/issues/9024 - "--disable-gpu", - "--headless", - "--remote-debugging-port=9222", - "--window-size=1440,900" - ] - } -}; +}