ci: install chromium from the distro archive instead of downloading Chrome

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
CyberCoveandClaude Sonnet 5.5 committed 2026-10-12 12:53:16 -07:00
1 parent 3f2be6fab0
commit 1a97b8b428
1 file changed
+8 -11
+8 -11
View File
@@ -35,26 +35,23 @@ jobs:
run: pnpm install --frozen-lockfile --ignore-scripts
- name: install headless chrome
# Debian/Ubuntu chromium from the distro archive (fast, mirrored),
# exposed under the name testem's "Chrome" launcher looks for.
shell: bash
run: |
set -euo pipefail
if ! command -v google-chrome >/dev/null 2>&1; then
SUDO=""; [ "$(id -u)" -ne 0 ] && SUDO="sudo"
$SUDO apt-get update -qq || true
$SUDO apt-get install -y -qq --no-install-recommends \
libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libgbm1 \
libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 \
libpango-1.0-0 libcairo2 libx11-6 libxcb1 libxext6 fonts-liberation \
|| true
$SUDO apt-get install -y -qq --no-install-recommends libasound2t64 \
|| $SUDO apt-get install -y -qq --no-install-recommends libasound2 || true
npx --yes @puppeteer/browsers@2 install chrome@stable --path "$RUNNER_TEMP/chrome"
CHROME_BIN=$(find "$RUNNER_TEMP/chrome" -type f -name chrome -perm -u+x | head -n 1)
export DEBIAN_FRONTEND=noninteractive
$SUDO apt-get update -qq
$SUDO apt-get install -y -qq --no-install-recommends chromium \
|| $SUDO apt-get install -y -qq --no-install-recommends chromium-browser
CHROME_BIN=$(command -v chromium || command -v chromium-browser)
mkdir -p "$HOME/bin"
ln -sf "$CHROME_BIN" "$HOME/bin/google-chrome"
echo "$HOME/bin" >> "$GITHUB_PATH"
fi
"${HOME}/bin/google-chrome" --version 2>/dev/null || google-chrome --version
PATH="$HOME/bin:$PATH" google-chrome --version
- name: build admin ui
run: pnpm --filter admin build