forked from garris/BackstopJS
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (70 loc) · 2.28 KB
/
backstop-sanity-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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"