mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
test(ci): add visual regression testing workflow
Solution-ID: SOL-1735410002 Issue-ID: ISS-1766921318981-22 Task-ID: T4
This commit is contained in:
41
.github/workflows/visual-tests.yml
vendored
Normal file
41
.github/workflows/visual-tests.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Visual Regression Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
visual-tests:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Install Playwright browsers
|
||||
run: npx playwright install --with-deps chromium
|
||||
|
||||
- name: Run visual tests
|
||||
run: npm run test:visual
|
||||
|
||||
- name: Upload visual artifacts on failure
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: visual-regression-artifacts
|
||||
path: |
|
||||
ccw/tests/visual/snapshots/current
|
||||
ccw/tests/visual/snapshots/diff
|
||||
retention-days: 7
|
||||
Reference in New Issue
Block a user