Skip to content

chore(deps-dev): bump @playwright/test from 1.58.2 to 1.59.1 #1291

chore(deps-dev): bump @playwright/test from 1.58.2 to 1.59.1

chore(deps-dev): bump @playwright/test from 1.58.2 to 1.59.1 #1291

Workflow file for this run

name: 'Tests'
on:
pull_request:
permissions:
contents: read
statuses: read
jobs:
tests_unit:
name: Run unit tests
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run unit tests
run: npm run test:unit
- name: Check for unused code
run: npm run knip
tests_e2e:
name: Run end-to-end tests
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Wait for Netlify deploy
id: netlify
run: |
echo "Waiting for Netlify deploy preview..."
DEPLOY_URL="https://deploy-preview-${{ github.event.pull_request.number }}--eventua11y.netlify.app"
# Wait for Netlify commit status to be success
MAX_ATTEMPTS=60
ATTEMPT=0
while [ $ATTEMPT -lt $MAX_ATTEMPTS ]; do
ATTEMPT=$((ATTEMPT + 1))
# Check commit status via GitHub API
STATUS=$(gh api repos/${{ github.repository }}/commits/${{ github.event.pull_request.head.sha }}/statuses \
--jq '[.[] | select(.context | contains("netlify"))] | .[0].state // "pending"')
echo "Attempt $ATTEMPT/$MAX_ATTEMPTS: Netlify status is '$STATUS'"
if [ "$STATUS" = "success" ]; then
echo "Netlify deploy complete!"
echo "url=$DEPLOY_URL" >> $GITHUB_OUTPUT
exit 0
elif [ "$STATUS" = "failure" ] || [ "$STATUS" = "error" ]; then
echo "Netlify deploy failed!"
exit 1
fi
sleep 10
done
echo "Timed out waiting for Netlify deploy"
exit 1
env:
GH_TOKEN: ${{ github.token }}
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Cache Playwright browsers
uses: actions/cache@v5
with:
path: ~/.cache/ms-playwright
key: playwright-browsers-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Install Playwright browsers
run: |
timeout 5m npx playwright install chromium --with-deps || (echo "Playwright installation timed out" && exit 1)
- name: Run tests
run: npx playwright test --retries=1 --timeout=90000
env:
# Hide the Netlify Drawer toolbar so it doesn't inject an iframe
# that causes false-positive axe-core ARIA violations (#549)
PLAYWRIGHT_TEST_BASE_URL: ${{ steps.netlify.outputs.url }}?ntl-drawer-state=hidden
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: playwright-report
path: playwright-report/
retention-days: 30