HDF5 Dimension Scales #1214
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Approve snapshots | |
on: | |
issue_comment: | |
types: [created] | |
jobs: | |
approve: | |
runs-on: ubuntu-latest | |
if: github.event.issue.pull_request && github.event.comment.body == '/approve' | |
steps: | |
- name: Get branch name for PR | |
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@v4 | |
with: | |
ref: ${{ steps.getBranchName.outputs.branch }} | |
- name: Set up Node 🕹️ | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: 'package.json' | |
- name: Install pnpm ⚙️ | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 9.x | |
- 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 dlx 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@v4 | |
with: | |
token: ${{ secrets.USER_TOKEN }} | |
branch: update-snapshots | |
title: 'Update Cypress reference snapshots' | |
commit-message: 'Update Cypress reference snapshots' |