Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/visual_regression.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Visual Regression

on:
pull_request:
push:
branches:
- staging
- master

jobs:
visual_regression:
name: visual_regression
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./client
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 22
cache: npm
cache-dependency-path: client/package-lock.json
- name: Install dependencies
run: npm ci
- name: Install Chromium
run: npx playwright install --with-deps chromium
- name: Run visual regression test
run: |
if [ -n "$PERCY_TOKEN" ]; then
npm run test:visual
else
echo "PERCY_TOKEN is not configured; running the browser test without uploading snapshots."
npm run test:visual:local
fi
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ node_modules/
# Build / Dist
dist
build
playwright-report/
test-results/

# macOS Metafiles
.DS_Store
Expand Down
Loading
Loading