Skip to content

Percy screenshots

Percy screenshots #13

Workflow file for this run

name: Percy screenshots
on:
workflow_call:
workflow_dispatch:
concurrency:
group: screenshots-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
screenshots:
name: Send screenshots
runs-on: ubuntu-latest
env:
PERCY_POSTINSTALL_BROWSER: false
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
PUPPETEER_SKIP_DOWNLOAD: true
# Skip when secrets are unavailable on forks
if: ${{ !github.event.pull_request.head.repo.fork }}
steps:
- name: Check secrets
if: ${{ !env.PERCY_TOKEN }}
run: echo "::warning title=GitHub Actions secrets::Workflow requires 'PERCY_TOKEN' secret"
- name: Checkout
uses: actions/[email protected]
- name: Install dependencies
uses: ./.github/workflows/actions/install-node
- name: Cache browser download
uses: actions/[email protected]
with:
# Use faster GNU tar for all runners
enableCrossOsArchive: true
key: puppeteer-${{ runner.os }}
path: .cache/puppeteer
- name: Build
uses: ./.github/workflows/actions/build
- name: Start review app
run: npm start --workspace @govuk-frontend/review &
- name: Send screenshots to Percy
run: npx --workspace @govuk-frontend/review percy exec -- npm run test:screenshots