Skip to content

Optimise domain computation when toggling errors #1476

Optimise domain computation when toggling errors

Optimise domain computation when toggling errors #1476

name: Approve snapshots
on:
workflow_dispatch:
issue_comment:
types: [created]
permissions:
contents: read
pull-requests: read
jobs:
approve:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || github.event.issue.pull_request && github.event.comment.body == '/approve'
steps:
- name: Get branch name for PR
if: github.event_name == 'issue_comment'
uses: andrevalentin/get-branch-name-by-pr@v1
id: getBranchName
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pr-id: ${{ github.event.issue.number }}
- name: Checkout 🏷️
uses: actions/checkout@v5
with:
ref: ${{ steps.getBranchName && steps.getBranchName.outputs.branch || github.event.ref }}
- name: Set up Node 🕹️
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
- name: Install pnpm ⚙️
uses: pnpm/action-setup@v4
- name: Restore cache 📌
uses: actions/cache@v4
with:
path: |
~/setup-pnpm/node_modules/.bin/store
~/.cache/Cypress
key: cache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- name: Install dependencies ⚙️
run: pnpm install
- name: Build packages 📦
run: pnpm packages
- name: Build demo 🛠️
run: pnpm build
- name: Serve ⚡️
run: pnpm serve & pnpm wait-on http://localhost:5173 -t 1m
- name: Run Cypress 🌳
run: pnpm cypress:run --env updateSnapshots=true
env:
CYPRESS_TAKE_SNAPSHOTS: true
- name: Upload debug screenshots and diffs on failure 🖼️
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress
path: |
cypress/debug/
cypress/snapshots/**/__diff_output__/
cypress/snapshots/**/__received_output__/
- name: Open PR to update reference snapshots 🎁
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.USER_TOKEN }}
branch: update-snapshots
delete-branch: true
title: 'Update Cypress reference snapshots'
commit-message: 'Update Cypress reference snapshots'