fix(ci): add playwright snapshots to whitelist and install chromium for webkit tests

1. Whitelist: Add tests/ui_tests/playwright/tests/*-snapshots/*.png to
   allowed patterns and suspicious file type exclusions

2. Webkit workflow: Install both chromium and webkit browsers since the
   auth setup step requires chromium even when running Safari tests
This commit is contained in:
LearningCircuit
2026-01-31 09:40:24 +01:00
parent b741e58c78
commit f3e51a0bf6
2 changed files with 4 additions and 2 deletions

View File

@@ -51,6 +51,7 @@ ALLOWED_PATTERNS=(
"installers/.*\.(bat|ps1|iss|ico)$"
"docs/images/.*\.(png|jpg|jpeg|gif|svg)$"
"src/local_deep_research/web/static/favicon\.png$"
"tests/ui_tests/playwright/tests/.*-snapshots/.*\.png$"
)
# Get list of files to check
@@ -245,7 +246,7 @@ elif echo "$file" | grep -iE "\.(log|tmp|temp|cache|bak|backup|swp|swo|DS_Store|
SUSPICIOUS_FILETYPE_VIOLATIONS+=("$file (temporary/cache)")
elif echo "$file" | grep -iE "\.(png|jpg|jpeg|gif|bmp|tiff|svg|ico|webp)$" >/dev/null; then
# Images are suspicious unless in specific directories
if ! echo "$file" | grep -qE "(docs/|\.github/|installers/.*\.(ico|png)$)"; then
if ! echo "$file" | grep -qE "(docs/|\.github/|installers/.*\.(ico|png)$|tests/ui_tests/playwright/tests/.*-snapshots/)"; then
SUSPICIOUS_FILETYPE_VIOLATIONS+=("$file (image file)")
fi
elif echo "$file" | grep -iE "\.(mp3|mp4|wav|avi|mov|mkv|flv|wmv|webm|m4a|ogg)$" >/dev/null; then

View File

@@ -59,7 +59,8 @@ jobs:
working-directory: tests/ui_tests/playwright
run: |
npm ci
npx playwright install webkit --with-deps
# Install chromium for auth setup step + webkit for Safari tests
npx playwright install chromium webkit --with-deps
- name: Setup test directories
run: |