diff --git a/.github/workflows/accessibility-tests.yml b/.github/workflows/accessibility-tests.yml new file mode 100644 index 0000000..7dcce71 --- /dev/null +++ b/.github/workflows/accessibility-tests.yml @@ -0,0 +1,35 @@ +name: Accessibility Tests + +on: + pull_request: + branches: + - gh-pages + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Install dependencies + run: | + python3 -m pip install --upgrade pip + pip install -r requirements.txt + pip install axe-core-python pytest playwright axe-playwright-python + + - name: Install Playwright browsers + run: | + playwright install + + - name: Run accessibility tests + run: | + python3 -m pytest tests/ diff --git a/_includes/header.html b/_includes/header.html index 9ef0438..38e8924 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -1,7 +1,7 @@ {% assign t = site.data.locales[page.lang][page.lang] %}