-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (38 loc) · 1.23 KB
/
vrt.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
name: VRT
on:
deployment_status:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
screenshots:
if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' && github.event.deployment_status.environment == 'Preview – github-nippou-web'
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
container:
image: mcr.microsoft.com/playwright:v1.40.1-focal
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v4
- uses: MH4GF/shared-config/.github/composite-actions/setup-pnpm@main
with:
node-version-file: web/.node-version
pnpm-version: "8.9.2"
working-directory: web
- run: pnpm i
- run: pnpm test:vrt:screenshots
env:
BASE_URL: https://github-nippou-web.vercel.app/
- run: pnpm test:vrt:compare
env:
BASE_URL: ${{ github.event.deployment_status.environment_url }}
- name: Upload failed screenshots
if: failure()
uses: actions/upload-artifact@v3
with:
name: vrt-failed-screenshots-${{ github.sha }}
path: web/test-results