Compare commits

...

5 Commits

Author SHA1 Message Date
Jeremy
985921490f Merge pull request #654 from Wikid82/hotfix/ci
fix(ci): enhance Playwright installation steps with system dependencies and cache checks
2026-02-04 12:29:11 -05:00
GitHub Actions
1b66257868 fix(ci): enhance Playwright installation steps with system dependencies and cache checks 2026-02-04 17:27:35 +00:00
Jeremy
e56e7656d9 Merge pull request #652 from Wikid82/hotfix/ci
fix: simplify Playwright browser installation steps
2026-02-04 12:10:19 -05:00
Jeremy
64f37ba7aa Merge branch 'main' into hotfix/ci 2026-02-04 12:09:37 -05:00
GitHub Actions
6e3fcf7824 fix: simplify Playwright browser installation steps
Remove overly complex verification logic that was causing all browser
jobs to fail. Browser installation should fail fast and clearly if
there are issues.

Changes:
- Remove multi-line verification scripts from all 3 browser install steps
- Simplify to single command: npx playwright install --with-deps {browser}
- Let install step show actual errors if it fails
- Let test execution show "browser not found" errors if install incomplete

Rationale:
- Previous complex verification (using grep/find) was the failure point
- Simpler approach provides clearer error messages for debugging
- Tests themselves will fail clearly if browsers aren't available

Expected outcome:
- Install steps show actual error messages if they fail
- If install succeeds, tests execute normally
- If install "succeeds" but browser is missing, test step shows clear error

Timeout remains at 45 minutes (accommodates 10-15 min install + execution)
2026-02-04 17:08:30 +00:00

View File

@@ -200,29 +200,18 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Install & verify Playwright Chromium
- name: Install Playwright system dependencies
run: npx playwright install-deps chromium
- name: Install Playwright Chromium
run: |
echo " Installing Playwright Chromium (with system dependencies)..."
echo "Start: $(date -u +'%Y-%m-%dT%H:%M:%SZ')"
echo "📦 Installing Chromium..."
npx playwright install --with-deps chromium
INSTALL_EXIT=$?
echo "Install exit code: $INSTALL_EXIT"
if [ $INSTALL_EXIT -ne 0 ]; then
echo "::error::Playwright Chromium installation failed"
echo "Cache contents:"
ls -la ~/.cache/ms-playwright/ || echo "Cache directory empty"
exit 1
fi
echo "✅ Verifying Chromium executable..."
if npx playwright test --list --project=chromium 2>&1 | grep -q "Chromium"; then
echo "✅ Chromium executable verified"
else
echo "::error::Chromium executable not found after installation"
exit 1
fi
echo "Completion: $(date -u +'%Y-%m-%dT%H:%M:%SZ')"
echo "✅ Install command completed (exit code: $?)"
echo "📁 Checking browser cache..."
ls -lR ~/.cache/ms-playwright/ 2>/dev/null || echo "Cache directory not found"
echo "🔍 Searching for chromium executable..."
find ~/.cache/ms-playwright -name "*chromium*" -o -name "*chrome*" 2>/dev/null | head -10 || echo "No chromium files found"
- name: Run Chromium tests (Shard ${{ matrix.shard }}/${{ matrix.total-shards }})
run: |
@@ -377,29 +366,18 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Install & verify Playwright Firefox
- name: Install Playwright system dependencies
run: npx playwright install-deps firefox
- name: Install Playwright Firefox
run: |
echo " Installing Playwright Firefox (with system dependencies)..."
echo "Start: $(date -u +'%Y-%m-%dT%H:%M:%SZ')"
echo "📦 Installing Firefox..."
npx playwright install --with-deps firefox
INSTALL_EXIT=$?
echo "Install exit code: $INSTALL_EXIT"
if [ $INSTALL_EXIT -ne 0 ]; then
echo "::error::Playwright Firefox installation failed"
echo "Cache contents:"
ls -la ~/.cache/ms-playwright/ || echo "Cache directory empty"
exit 1
fi
echo "✅ Verifying Firefox executable..."
if npx playwright test --list --project=firefox 2>&1 | grep -q "Firefox"; then
echo "✅ Firefox executable verified"
else
echo "::error::Firefox executable not found after installation"
exit 1
fi
echo "Completion: $(date -u +'%Y-%m-%dT%H:%M:%SZ')"
echo "✅ Install command completed (exit code: $?)"
echo "📁 Checking browser cache..."
ls -lR ~/.cache/ms-playwright/ 2>/dev/null || echo "Cache directory not found"
echo "🔍 Searching for firefox executable..."
find ~/.cache/ms-playwright -name "*firefox*" 2>/dev/null | head -10 || echo "No firefox files found"
- name: Run Firefox tests (Shard ${{ matrix.shard }}/${{ matrix.total-shards }})
run: |
@@ -554,29 +532,18 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Install & verify Playwright WebKit
- name: Install Playwright system dependencies
run: npx playwright install-deps webkit
- name: Install Playwright WebKit
run: |
echo " Installing Playwright WebKit (with system dependencies)..."
echo "Start: $(date -u +'%Y-%m-%dT%H:%M:%SZ')"
echo "📦 Installing WebKit..."
npx playwright install --with-deps webkit
INSTALL_EXIT=$?
echo "Install exit code: $INSTALL_EXIT"
if [ $INSTALL_EXIT -ne 0 ]; then
echo "::error::Playwright WebKit installation failed"
echo "Cache contents:"
ls -la ~/.cache/ms-playwright/ || echo "Cache directory empty"
exit 1
fi
echo "✅ Verifying WebKit executable..."
if npx playwright test --list --project=webkit 2>&1 | grep -q "WebKit"; then
echo "✅ WebKit executable verified"
else
echo "::error::WebKit executable not found after installation"
exit 1
fi
echo "Completion: $(date -u +'%Y-%m-%dT%H:%M:%SZ')"
echo "✅ Install command completed (exit code: $?)"
echo "📁 Checking browser cache..."
ls -lR ~/.cache/ms-playwright/ 2>/dev/null || echo "Cache directory not found"
echo "🔍 Searching for webkit executable..."
find ~/.cache/ms-playwright -name "*webkit*" -o -name "*MiniBrowser*" 2>/dev/null | head -10 || echo "No webkit files found"
- name: Run WebKit tests (Shard ${{ matrix.shard }}/${{ matrix.total-shards }})
run: |