Skip to content

Visual Regression Testing #13

Visual Regression Testing

Visual Regression Testing #13

name: Visual Regression Testing
on:
# pull_request:
# types: [opened, reopened, ready_for_review, synchronize]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
chromatic:
name: Run Chromatic
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
steps:
# https://github.com/actions/checkout
- name: 🏗️ Check out repository code
uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 0
# https://github.com/pnpm/action-setup
- name: 🏗️ Install pnpm package manager
uses: pnpm/action-setup@v6
with:
version: "10.33.0"
# https://github.com/actions/setup-node
- name: 🏗️ Install Node.js and cache packages
uses: actions/setup-node@v6
with:
node-version: "24.14.1"
# https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data
cache: "pnpm"
- name: 🏗️ Install dependencies
run: pnpm install --frozen-lockfile
# https://github.com/chromaui/action
# https://github.com/chromaui/chromatic-cli
- name: ☑️ Build Chromatic
uses: chromaui/action@v16.2.0
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
exitZeroOnChanges: ${{ github.ref == 'refs/heads/master' && true || false }}
skip: "dependabot/**"
# dryRun: true