Skip to content

chore(deps-dev): bump eslint-plugin-astro from 1.7.0 to 2.1.1 #46

chore(deps-dev): bump eslint-plugin-astro from 1.7.0 to 2.1.1

chore(deps-dev): bump eslint-plugin-astro from 1.7.0 to 2.1.1 #46

Workflow file for this run

# =============================================================================
# Playwright Tests — functional + pixel-by-pixel visual regression.
#
# BASELINE STRATEGY (macOS dev vs. Linux CI):
# Rendering differs between operating systems, so visual baselines are
# platform-suffixed (see `snapshotPathTemplate` in playwright.config.ts:
# `...-{projectName}-{platform}{ext}`). Locally on macOS you generate
# `-darwin` snapshots; they are NOT the source of truth for CI.
#
# The authoritative `-linux` baselines are generated and committed by THIS
# workflow, inside the official Playwright container, so they always match
# the CI renderer exactly:
# * push to main / manual dispatch -> regenerate Linux baselines with
# `--update-snapshots`, then commit any changes under the snapshots dir.
# * pull_request -> strict compare against the committed Linux baselines
# (no updating); a real visual diff fails the build.
#
# The container image is pinned to the installed @playwright/test version
# (1.61.1) so the browser binaries and the test runner stay in lockstep.
# =============================================================================
name: Playwright Tests
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
# Needed so the push-to-main job can commit regenerated Linux baselines.
permissions:
contents: write
jobs:
test:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.61.1-jammy
env:
# The Playwright container expects HOME=/root; some Actions runners unset it.
HOME: /root
CI: 'true'
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install dependencies
run: npm ci
# ---- Pull requests: strict compare against committed Linux baselines ----
- name: Run Playwright tests (PR — strict compare)
if: github.event_name == 'pull_request'
run: npx playwright test
# ---- Push to main / manual: (re)generate and commit Linux baselines ----
- name: Run Playwright tests (update Linux baselines)
if: github.event_name != 'pull_request'
run: npx playwright test --update-snapshots
- name: Commit updated baselines
if: github.event_name != 'pull_request'
run: |
# Mark the checkout as a safe dir before any git command; the
# Playwright container runs as root while the checkout is runner-owned.
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
if [ -n "$(git status --porcelain tests)" ]; then
git add tests/__screenshots__
if ! git diff --cached --quiet; then
git commit -m "chore: update visual baselines [skip ci]"
git push "https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git" HEAD:${{ github.ref_name }}
else
echo "No screenshot changes staged; nothing to commit."
fi
else
echo "No baseline changes detected."
fi
# ---- Always publish the report + raw results for inspection ----
- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@v7
with:
name: playwright-report
path: playwright-report/
retention-days: 14
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: test-results
path: test-results/
retention-days: 14