Skip to content

test(label-content-name-mismatch): cover visually-hidden text exclusion #1837

test(label-content-name-mismatch): cover visually-hidden text exclusion

test(label-content-name-mismatch): cover visually-hidden text exclusion #1837

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches:
- master
- develop
- release-*
# We want to group to the workflow for each branch.
# Non-push events will be cancelled if a new one is started.
# Push events will run sequentially. This helps ensure that
# the `next` tag isn't out of sync.
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions: {}
env:
CHROME_DEVEL_SANDBOX: /opt/google/chrome/chrome-sandbox
jobs:
lint:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- &checkout
name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
# Must precede setup-node so its `cache: pnpm` can resolve the store path.
- &setup-pnpm
name: Set up pnpm
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- &setup-node
name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .nvmrc
cache: 'pnpm'
- &install-deps-directly
name: Install Dependencies
run: pnpm ci
- name: Run ESLint
run: pnpm run eslint
fmt_check:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- *checkout
- *setup-pnpm
- *setup-node
- *install-deps-directly
- run: pnpm run fmt:check
build:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- *checkout
- *setup-pnpm
- *setup-node
- *install-deps-directly
- &build
name: Build
run: pnpm run build
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: axe-core
path: axe.js
retention-days: 1
test_chrome:
runs-on: ubuntu-24.04
timeout-minutes: 10
env:
DISPLAY: :99
steps:
- *checkout
- &install-deps-with-xvfb
name: Install Deps
uses: ./.github/actions/install-deps
id: install-deps
with:
start-xvfb: ${{ env.DISPLAY }}
- *build
- name: Run Tests Against Chrome
env:
WTR_BROWSER: chrome
CHROME_BIN: ${{ steps.install-deps.outputs.chrome-path }}
CHROMEDRIVER_BIN: ${{ steps.install-deps.outputs.chromedriver-path }}
run: pnpm run test
- name: Run Chrome Integration Tests
env:
CHROME_BIN: ${{ steps.install-deps.outputs.chrome-path }}
CHROMEDRIVER_BIN: ${{ steps.install-deps.outputs.chromedriver-path }}
run: pnpm run test:integration:chrome
test_firefox:
runs-on: ubuntu-24.04
timeout-minutes: 10
env:
DISPLAY: :99
steps:
- *checkout
- *install-deps-with-xvfb
- *build
- name: Run Tests Against Firefox
env:
WTR_BROWSER: firefox
FIREFOX_BIN: ${{ steps.install-deps.outputs.firefox-path }}
run: pnpm run test
- name: Run Firefox Integration Tests
env:
FIREFOX_BIN: ${{ steps.install-deps.outputs.firefox-path }}
run: pnpm run test:integration:firefox
# Run examples under `doc/examples`
test_examples:
runs-on: ubuntu-24.04
timeout-minutes: 10
# Temporarily non-blocking due to an upstream issue with the examples.
# A failure here will not fail the Tests workflow, so it won't block deploys.
# Remove this once the upstream issue is resolved.
continue-on-error: true
steps:
- *checkout
- &install-deps
name: Install Deps
id: install-deps
uses: ./.github/actions/install-deps
- *build
- name: Run Tests Against Examples
env:
PUPPETEER_EXECUTABLE_PATH: ${{ steps.install-deps.outputs.chrome-path }}
run: pnpm run test:examples
test_act:
runs-on: ubuntu-24.04
timeout-minutes: 10
needs: build
steps:
- *checkout
- *install-deps
- &restore-axe-build
name: Restore axe build
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: axe-core
- name: Run ACT Tests
env:
CHROME_BIN: ${{ steps.install-deps.outputs.chrome-path }}
CHROMEDRIVER_BIN: ${{ steps.install-deps.outputs.chromedriver-path }}
run: pnpm run test:act
test_aria_practices:
runs-on: ubuntu-24.04
timeout-minutes: 10
needs: build
steps:
- *checkout
- *install-deps
- *restore-axe-build
- name: Run ARIA Practices Tests
env:
CHROME_BIN: ${{ steps.install-deps.outputs.chrome-path }}
CHROMEDRIVER_BIN: ${{ steps.install-deps.outputs.chromedriver-path }}
run: pnpm run test:apg
test_locales:
runs-on: ubuntu-24.04
timeout-minutes: 10
needs: build
steps:
- *checkout
- *install-deps
- *restore-axe-build
- name: Run Locale Tests
run: pnpm run test:locales
test_virtual_rules:
runs-on: ubuntu-24.04
timeout-minutes: 10
needs: build
steps:
- *checkout
- *install-deps
- *restore-axe-build
- name: Run Virtual Rules Tests
run: pnpm run test:virtual-rules
test_jsdom:
runs-on: ubuntu-24.04
timeout-minutes: 10
needs: build
steps:
- *checkout
- *install-deps
- *restore-axe-build
- name: Run jsdom Tests
run: pnpm run test:jsdom
build_api_docs:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- *checkout
- *install-deps
- name: Run API Docs Build
run: pnpm run api-docs
test_rule_help_version:
runs-on: ubuntu-24.04
timeout-minutes: 10
if: ${{ github.ref_name == 'master' }}
steps:
- *checkout
- *install-deps
- name: Run Rule Help Version Tests
run: pnpm run test:rule-help-version
sri-validate:
runs-on: ubuntu-24.04
timeout-minutes: 10
needs: build
# Run on master and RC branches along with PRs targeting those branches.
if: ${{ github.ref_name == 'master' || startsWith(github.ref_name, 'release-') || github.event.pull_request.base.ref == 'master' || startsWith(github.event.pull_request.base.ref, 'release-') }}
steps:
- *checkout
- *install-deps
- *restore-axe-build
- name: Validate Subresource Integrity
run: pnpm run sri-validate
test_node:
# The package can't be built on Node 6 anymore, but should still run there.
# So we need to pull in a previous build artifact.
needs: build
strategy:
matrix:
node:
- 6
- 18
- 20
- 22
- 24
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- *checkout
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node }}
- *restore-axe-build
# Invoked directly rather than through pnpm: this matrix covers Node
# versions far older than pnpm itself can run on.
- name: Run Node.js Tests
run: node test/node/node.js