Skip to content

E2E Visual Baselines #55

E2E Visual Baselines

E2E Visual Baselines #55

Workflow file for this run

name: E2E Visual Baselines
on:
workflow_dispatch:
schedule:
- cron: '30 4 * * *'
jobs:
e2e-visual:
name: "E2E Visual Baselines (Apache + MariaDB, non-blocking)"
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install npm dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: Start WordPress environment
run: npx wp-env start
- name: Wait for WordPress to be ready
run: |
for i in $(seq 1 30); do
if curl -s -o /dev/null -w "%{http_code}" http://localhost:8889/wp-login.php | grep -q "200"; then
echo "WordPress is ready"
break
fi
echo "Waiting for WordPress... (attempt $i)"
sleep 2
done
- name: Assert pinned WordPress beta version
run: npm run env:assert-wp-version
- name: Run visual baseline tests (non-blocking)
id: visual
continue-on-error: true
run: npm run test:e2e:visual
- name: Upload visual artifacts
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v7
with:
name: playwright-visual-report
path: |
playwright-report/
tests/e2e/artifacts/test-results/
retention-days: 7
if-no-files-found: ignore
- name: Report visual drift
if: ${{ steps.visual.conclusion == 'failure' }}
run: |
echo "Visual baseline drift detected (non-blocking workflow)."
echo "Review uploaded artifacts and update snapshots intentionally if needed."
- name: Stop WordPress environment
if: always()
run: npx wp-env stop