Skip to content

chore: should able to update snapshots #14

chore: should able to update snapshots

chore: should able to update snapshots #14

Workflow file for this run

name: Playwright Tests

Check failure on line 1 in .github/workflows/playwright.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/playwright.yml

Invalid workflow file

`inputs` is not a valid event name
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
# Allow updating snapshots during automatic runs
inputs:
update-snapshots:
description: "Update snapshots?"
type: boolean
# Allow updating snapshots during manual runs
workflow_call:
inputs:
update-snapshots:
description: "Update snapshots?"
type: boolean
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: 20.x
- name: Install dependencies
run: npm install -g pnpm && pnpm install
- name: Install Playwright Browsers
- name: Install deps
run: |
pnpm install
pnpm exec playwright install
- name: Set up cache
id: cache
uses: actions/cache@v4
with:
key: cache/${{github.repository}}/${{github.ref}}
restore-keys: cache/${{github.repository}}/refs/heads/master
path: .test/**
- name: Initialize snapshots
if: ${{steps.cache.outputs.cache-hit != 'true' || inputs.update-snapshots == 'true'}}
run: pnpm exec playwright test --update-snapshots
- name: Test
run: pnpm exec playwright test