-
Notifications
You must be signed in to change notification settings - Fork 3
70 lines (60 loc) · 1.71 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Visual Regression Test by File - Base Image
on:
workflow_dispatch:
inputs:
specFile:
description: 'name of the visual test file'
required: true
type: string
jobs:
CreateBaseImages:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: Update npm registry
run: npm run registry
- name: Install dependencies
run: npm install
- name: Install Cypress
run: npm run cy:install
- name: Build
run: npm run cy:build
- name: Run Cypress
uses: cypress-io/github-action@v4
with:
start: npm run cy:start
wait-on: 'http://localhost:3333'
working-directory: packages/components
install: false
browser: chrome
env: type=base
spec: |
cypress/e2e/visual/${{ inputs.specFile }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload snapshots
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-snapshots
path: packages/components/cypress/snapshots
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Commit base images
uses: EndBug/add-and-commit@v9
with:
message: 'chore(): update base images'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}