Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions .github/workflows/12-check-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-browsers
key: ${{ runner.os }}-playwright-browsers-${{ hashFiles('web/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-playwright-browsers-

# System deps for chromium only (not the full webkit/firefox apt set,
# which pulls in the gstreamer/audio/video stack and takes ~14m). Runs
Expand All @@ -98,10 +100,23 @@ jobs:
working-directory: web/tests
run: pnpm exec playwright install-deps chromium

- name: Install Playwright if not cached
if: (github.event_name != 'workflow_dispatch' || contains(fromJSON('["all","web-only"]'), inputs.packages)) && steps.restore-playwright-cache.outputs.cache-hit != 'true'
- name: Install Playwright browser
if: github.event_name != 'workflow_dispatch' || contains(fromJSON('["all","web-only"]'), inputs.packages)
working-directory: web/tests
run: pnpm exec playwright install chromium
run: |
for attempt in 1 2 3; do
echo "::group::playwright install chromium (attempt ${attempt}/3)"
if timeout 180 pnpm exec playwright install chromium; then
echo "::endgroup::"
echo "browser install succeeded on attempt ${attempt}"
exit 0
fi
echo "::endgroup::"
echo "attempt ${attempt} stalled or failed; retrying after 5s..."
sleep 5
done
echo "playwright browser install failed after 3 attempts" >&2
exit 1

- name: Run web unit tests
if: github.event_name != 'workflow_dispatch' || contains(fromJSON('["all","web-only"]'), inputs.packages)
Expand Down
Loading