-
Notifications
You must be signed in to change notification settings - Fork 27
48 lines (43 loc) · 1.21 KB
/
visual-base.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
name: 📸 Create All Base Images
on:
workflow_dispatch:
jobs:
main:
name: 📸 Updating Screenshots
runs-on: ubuntu-latest
env:
HUSKY: 0
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PRE_RELEASE_GITHUB_TOKEN }}
fetch-depth: 0
- uses: ./.github/workflows/actions/e2e-build
with:
build: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Cypress
uses: cypress-io/github-action@v6
with:
start: node ./web-server.js
wait-on: 'http://localhost:3333'
working-directory: e2e
install: false
browser: chrome
spec: |
cypress/e2e/visual/*.cy.ts
env:
CYPRESS_visualRegressionType: base
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload snapshots
if: failure()
uses: actions/upload-artifact@v4
with:
name: cypress-snapshots
path: e2e/cypress/snapshots
- name: Commit base images
uses: EndBug/add-and-commit@v9
with:
message: 'update base images'
env:
GITHUB_TOKEN: ${{ secrets.PRE_RELEASE_GITHUB_TOKEN }}