Skip to content

Commit c20f2e0

Browse files
authored
MAINT - Add CI env check for a11y tests (#1915)
1 parent 0acb754 commit c20f2e0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/CI.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ jobs:
106106
- name: "Run accessibility tests with playwright 🎭"
107107
# build PST, build docs, then run a11y-tests
108108
run: python -Im tox run -e py312-docs,a11y-tests
109-
continue-on-error: true
110109

111110
# Build our docs (PST) on major OSes and check for warnings
112111
build-site:

tox.ini

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,18 @@ commands =
7272
[testenv:a11y-tests]
7373
description = run accessibility tests with Playwright and axe-core
7474
base_python = py312 # keep in sync with tests.yml
75+
pass_env = GITHUB_ACTIONS # so we can check if this is run on GitHub Actions
7576
extras =
7677
test
7778
a11y
7879
depends =
7980
compile,
8081
py312-docs
81-
allowlist_externals=playwright
82+
allowlist_externals=
83+
playwright
84+
bash
8285
commands =
83-
playwright install
86+
bash -c 'if [[ "{env:GITHUB_ACTIONS:}" == "true" ]]; then playwright install --with-deps; else playwright install; fi'
8487
pytest -m "a11y" {posargs}
8588

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

0 commit comments

Comments
 (0)