fix: More html linting #4
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: "E2E and accessibility tests" | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Run end-to-end accessibility tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.13" | |
cache: pip | |
cache-dependency-path: tests/requirements.txt | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r tests/requirements.txt | |
- name: Install Playwright browsers | |
run: | | |
python -m playwright install --with-deps chromium | |
- name: Run E2E a11y tests against built pages | |
id: e2e | |
env: | |
PLAYWRIGHT_HEADLESS: "1" | |
PYTEST_PLAYWRIGHT_OUTPUT_DIR: test-results | |
run: | | |
# Retain artifacts on failure so we can upload them | |
pytest tests/test_axe.py \ | |
--maxfail=1 --disable-warnings \ | |
--tracing=retain-on-failure \ | |
--screenshot=only-on-failure | |
- name: Upload Playwright artifacts | |
if: ${{ failure() && steps.e2e.conclusion == 'failure' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: playwright-artifacts | |
path: | | |
test-results |