From 1a97b8b428e87c69d14a5871a5c22c505edb14f6 Mon Sep 17 00:00:00 2001 From: CyberCove Date: Mon, 12 Oct 2026 12:53:16 -0700 Subject: [PATCH] ci: install chromium from the distro archive instead of downloading Chrome Co-Authored-By: Claude Sonnet 5.5 --- .gitea/workflows/ci.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 2d54135ef..b35d693fe 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -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