-
Notifications
You must be signed in to change notification settings - Fork 37
72 lines (61 loc) · 1.88 KB
/
visual-comparison.yaml
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
name: Visual Comparison
on:
push:
branches: [visual-tests]
# on:
# push:
# paths:
# - 'src/**'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_SECRET_KEY }}
AWS_DEFAULT_REGION: us-east-1
APPZI_TOKEN: ${{ secrets.APPZI_TOKEN }}
MENDABLE_API_KEY: ${{ secrets.MENDABLE_API_KEY }}
FULLSTORY_ORGID: ${{ secrets.FULLSTORY_ORGID }}
ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }}
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_SEARCH_KEY: ${{ secrets.ALGOLIA_SEARCH_KEY }}
jobs:
take-screenshots:
name: Visual Comparison
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: Build the website
run: make build
- name: Take screenshots with Playwright
run: make test-visual-ci
- name: Upload screenshots
uses: actions/upload-artifact@v4
id: screenshots
with:
name: "snapshots"
path: |
screenshots/screenshot.specs.ts-snapshots/
if-no-files-found: error
retention-days: 1
- name: Upload Report
uses: actions/upload-artifact@v4
id: report
with:
name: "report"
path: |
playwright-report/
if-no-files-found: error
retention-days: 1
- name: URLs
run: |
echo 'Screenshots URL is ${{ steps.screenshots.outputs.artifact-url }}'
echo 'Report URL is ${{ steps.report.outputs.artifact-url }}'