Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Screenshot feature

Screenshot feature #23

name: Playwright Visual Review
on:
pull_request:
types: [opened, reopened, synchronize]
permissions:
contents: write
pull-requests: write
jobs:
visual-review:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Resolve dependencies
run: |
# Fix lockfile issues
npm install --package-lock-only --ignore-scripts
npm install
- name: Install Playwright
run: npx playwright install --with-deps
- name: Capture GUI screenshots
run: node scripts/screenshot.js
- name: Upload screenshots
uses: actions/upload-artifact@v3
with:
name: gui-screenshots
path: tests_artifacts/*.png
retention-days: 1
- name: Post PR comment
uses: marocchino/sticky-pull-request-comment@v2
with:
header: gui-screenshots
message: |
## 🖼️ Automated GUI Test Preview
Screenshots captured during tests are available in workflow artifacts:
[Download Screenshots](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
**Path:** `tests_artifacts/`
if: always()