Skip to content

Commit

Permalink
MAINT - Add CI env check for a11y tests (#1915)
Browse files Browse the repository at this point in the history
  • Loading branch information
trallard committed Jul 2, 2024
1 parent 0acb754 commit c20f2e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ jobs:
- name: "Run accessibility tests with playwright 🎭"
# build PST, build docs, then run a11y-tests
run: python -Im tox run -e py312-docs,a11y-tests
continue-on-error: true

# Build our docs (PST) on major OSes and check for warnings
build-site:
Expand Down
7 changes: 5 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,18 @@ commands =
[testenv:a11y-tests]
description = run accessibility tests with Playwright and axe-core
base_python = py312 # keep in sync with tests.yml
pass_env = GITHUB_ACTIONS # so we can check if this is run on GitHub Actions
extras =
test
a11y
depends =
compile,
py312-docs
allowlist_externals=playwright
allowlist_externals=
playwright
bash
commands =
playwright install
bash -c 'if [[ "{env:GITHUB_ACTIONS:}" == "true" ]]; then playwright install --with-deps; else playwright install; fi'
pytest -m "a11y" {posargs}

# build PST documentation with the default or a specific Sphinx version
Expand Down

0 comments on commit c20f2e0

Please sign in to comment.