diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 91b4252..a1c1e0b 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: - run: npm run build - name: Install Playwright browser - run: npx playwright install --with-deps chromium + run: bash scripts/install-playwright-chromium.sh - name: E2E mock suite run: npm run test:e2e diff --git a/.gitea/workflows/e2e-ift.yml b/.gitea/workflows/e2e-ift.yml index 8f694b2..118d400 100644 --- a/.gitea/workflows/e2e-ift.yml +++ b/.gitea/workflows/e2e-ift.yml @@ -33,7 +33,7 @@ jobs: - run: npm ci - name: Install Playwright browser - run: npx playwright install --with-deps chromium + run: bash scripts/install-playwright-chromium.sh - name: Load smoke credentials from IFT .env env: diff --git a/scripts/install-playwright-chromium.sh b/scripts/install-playwright-chromium.sh new file mode 100644 index 0000000..e89d121 --- /dev/null +++ b/scripts/install-playwright-chromium.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +# Install Playwright Chromium for CI on self-hosted act_runner/WSL. +# --with-deps runs apt and can fail when openssh-server dpkg is half-configured +# (systemctl unavailable in WSL job container). +set -euo pipefail + +if npx playwright install --with-deps chromium; then + exit 0 +fi + +echo "::warning::playwright --with-deps failed; installing browser binary only (system libs expected on runner)" +npx playwright install chromium