Files
gitea/tools/playwright.sh
T
silverwindandGitHub df71d5f5e2 test: run frontend unit tests in browsers (#38860)
Run them in headless [vitest browser
mode](https://vitest.dev/guide/browser/) in chromium and firefox.
Similar UX than current tests, it's about 5 times as slow (goes from 1s
to 5s on my machine), but definitely worth it as it removes all
happy-dom problems.

---------

Signed-off-by: silverwind <me@silverwind.io>
2026-08-17 22:22:54 +00:00

10 lines
365 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
# playwright only supports ubuntu/debian officially, and on CI VMs its system deps are pre-installed
if [ -z "${GITHUB_ACTIONS:-}" ] && [ "$(uname -s)" = "Linux" ] && grep -qE '^ID(_LIKE)?=.*(ubuntu|debian)' /etc/os-release 2>/dev/null; then
pnpm exec playwright install --with-deps "$@"
else
pnpm exec playwright install "$@"
fi