-
Notifications
You must be signed in to change notification settings - Fork 26
53 lines (48 loc) · 1.35 KB
/
visual-base-file.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
name: 📸 Create Base Image by File
on:
workflow_dispatch:
inputs:
specFile:
description: 'name of the visual test file'
required: true
type: string
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/${{ inputs.specFile }}
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 }}