Build: Fix Chrome beta tests #72
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Browser Tests | |
| on: | |
| pull_request: | |
| push: | |
| branches-ignore: "dependabot/**" | |
| permissions: | |
| contents: read # to fetch code (actions/checkout) | |
| env: | |
| NODE_VERSION: 24.x | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| name: ${{ matrix.NPM_SCRIPT }} - ${{ matrix.NAME }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| NAME: ["Chrome"] | |
| NPM_SCRIPT: ["test:slim", "test:no-deprecated", "test:selector-native", "test:esm"] | |
| include: | |
| - NAME: "Chrome/Firefox" | |
| NPM_SCRIPT: "test:browser" | |
| - NAME: "Firefox ESR (new)" | |
| NPM_SCRIPT: "test:firefox" | |
| - NAME: "Firefox ESR (old)" | |
| NPM_SCRIPT: "test:firefox" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Use Node.js ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: npm | |
| cache-dependency-path: '**/package-lock.json' | |
| - name: Set download URL for Firefox ESR (old) | |
| run: | | |
| echo "FIREFOX_SOURCE_URL=https://download.mozilla.org/?product=firefox-esr-latest-ssl&lang=en-US&os=linux64" >> "$GITHUB_ENV" | |
| if: contains(matrix.NAME, 'Firefox ESR (old)') | |
| - name: Set download URL for Firefox ESR (new) | |
| run: | | |
| echo "FIREFOX_SOURCE_URL=https://download.mozilla.org/?product=firefox-esr-next-latest-ssl&lang=en-US&os=linux64" >> "$GITHUB_ENV" | |
| if: contains(matrix.NAME, 'Firefox ESR (new)') | |
| - name: Install Firefox ESR | |
| run: | | |
| wget --no-verbose "$FIREFOX_SOURCE_URL" -O - | tar -Jx -C "$HOME" | |
| echo "PATH=${HOME}/firefox:$PATH" >> "$GITHUB_ENV" | |
| echo "FIREFOX_BIN=${HOME}/firefox/firefox" >> "$GITHUB_ENV" | |
| if: contains(matrix.NAME, 'Firefox ESR') | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run tests | |
| run: npm run ${{ matrix.NPM_SCRIPT }} | |
| ie: | |
| runs-on: windows-latest | |
| name: test:ie - IE | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Use Node.js ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: npm | |
| cache-dependency-path: '**/package-lock.json' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run tests in Edge in IE mode | |
| run: npm run test:ie | |
| safari: | |
| runs-on: macos-latest | |
| name: test:safari - Safari | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Use Node.js ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: npm | |
| cache-dependency-path: '**/package-lock.json' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run tests | |
| run: npm run test:safari |