diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 877756193..c6c7f6058 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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: diff --git a/tox.ini b/tox.ini index e109a8113..b675d5a9a 100644 --- a/tox.ini +++ b/tox.ini @@ -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