Skip to content

Backstop Sanity Tests #54

Backstop Sanity Tests

Backstop Sanity Tests #54

name: Sanity Test Checks
on:
workflow_dispatch:
workflow_call:
permissions:
actions: write
contents: write
pull-requests: write
env:
NODE_VERSION: 20
jobs:
sanity-puppeteer:
name: 🤪 Puppeteer
runs-on: ubuntu-latest
steps:
- name: Checkout actions
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.head_ref || github.ref_name || github.ref }}
sparse-checkout: |
.github/actions
path: actions
- uses: ./actions/.github/actions/setup-base
id: base
- uses: ./actions/.github/actions/setup-node
id: node
with:
WORKSPACE_ROOT: ${{ steps.base.outputs.WORKSPACE_ROOT }}
- name: "𓋏 Run `npm run sanity-test`"
continue-on-error: true
shell: bash
working-directory: ${{ steps.base.outputs.WORKSPACE_ROOT }}
run: |
npm run sanity-test
- uses: ./actions/.github/actions/sanity-test-checks
with:
WORKSPACE_ROOT: ${{ steps.base.outputs.WORKSPACE_ROOT }}
RUNNER: "Puppeteer"
FIXTURE: "sanity-test.json"
sanity-playwright:
name: 🤪 Playwright
runs-on: ubuntu-latest
steps:
- name: Checkout actions
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.head_ref || github.ref_name || github.ref }}
sparse-checkout: |
.github/actions
path: actions
- uses: ./actions/.github/actions/setup-base
id: base
- uses: ./actions/.github/actions/setup-node
id: node
with:
WORKSPACE_ROOT: ${{ steps.base.outputs.WORKSPACE_ROOT }}
- uses: ./actions/.github/actions/cache-playwright
with:
WORKSPACE_ROOT: ${{ steps.base.outputs.WORKSPACE_ROOT }}
- name: "🎭 Run `npm run sanity-test-playwright`"
continue-on-error: true
shell: bash
working-directory: ${{ steps.base.outputs.WORKSPACE_ROOT }}
run: |
npm run sanity-test-playwright
- uses: ./actions/.github/actions/sanity-test-checks
with:
WORKSPACE_ROOT: ${{ steps.base.outputs.WORKSPACE_ROOT }}
RUNNER: "Playwright"
FIXTURE: "sanity-test-playwright.json"