Skip to content

Commit 460ff22

Browse files
committed
install stable chrome
1 parent 8ff7d27 commit 460ff22

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,21 @@ jobs:
202202
node-version: "20"
203203
cache: "pnpm"
204204

205+
- name: Install stable Chromium
206+
run: |
207+
set -euo pipefail
208+
CHROME_VERSION=$(curl -s https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions.json | jq -r '.channels.Stable.version')
209+
DOWNLOAD_URL="https://storage.googleapis.com/chrome-for-testing-public/${CHROME_VERSION}/linux64/chrome-linux64.zip"
210+
INSTALL_DIR="${RUNNER_TEMP}/chrome-stable"
211+
mkdir -p "$INSTALL_DIR"
212+
curl -sSL "$DOWNLOAD_URL" -o "$INSTALL_DIR/chrome-linux64.zip"
213+
unzip -q "$INSTALL_DIR/chrome-linux64.zip" -d "$INSTALL_DIR"
214+
CHROME_BIN="$INSTALL_DIR/chrome-linux64/chrome"
215+
chmod +x "$CHROME_BIN"
216+
echo "Installed Chromium version: $CHROME_VERSION"
217+
"$CHROME_BIN" --version
218+
echo "CHROME_PATH=$CHROME_BIN" >> $GITHUB_ENV
219+
205220
- name: Install dependencies
206221
run: pnpm install --frozen-lockfile
207222

0 commit comments

Comments
 (0)