-
Notifications
You must be signed in to change notification settings - Fork 38
42 lines (36 loc) · 1.24 KB
/
playwright-compare.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
name: 📷 Playwright Compare
on:
workflow_dispatch:
inputs:
before-commit:
description: 'The commit hash or branch name for "before" screenshots'
required: true
after-commit:
description: 'The commit hash or branch name for "after" screenshots (optional)'
required: false
jobs:
compare-screenshots:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
# - name: Set up Python
# uses: actions/setup-python@v2
# with:
# python-version: '3.x'
- name: Run Python script
id: run-python
run: |
before_commit="${{ github.event.inputs.before-commit }}"
after_commit="${{ github.event.inputs.after-commit }}"
if [ -z "$after_commit" ]; then
after_commit="${{ github.sha }}"
fi
python .github/scripts/compare_screenshots.py "$before_commit" "$after_commit"
- name: Upload side-by-side images
uses: actions/upload-artifact@v3
with:
name: side-by-side-images-${{ steps.run-python.outputs.cache_key }}
path: side_by_side_images