Skip to content

Complete glass unification and component updates #1

Complete glass unification and component updates

Complete glass unification and component updates #1

name: Visual Regression Testing
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
visual-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build Storybook
run: npm run build-storybook
- name: Serve Storybook
run: npx serve -s storybook-static -p 6006 &
- name: Wait for Storybook
run: npx wait-on http://localhost:6006
- name: Run visual regression tests
run: npm run test:visual
- name: Upload test results
uses: actions/upload-artifact@v4
if: failure()
with:
name: visual-regression-results
path: tests/visual/__image_snapshots__/__diff_output__
- name: Comment PR with visual changes
if: github.event_name == 'pull_request' && failure()
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '🔍 Visual regression tests detected changes. Please review the artifacts.'
})