Skip to content

Commit 6cb41bf

Browse files
[CI] install stable chrome (#1293)
# why - chrome launcher was installing canary, which broke some unit tests # what changed - added install step for a stable chrome version in `ci.yml` - also lowered worker count for `shadow-frame.spec.ts`
1 parent 91a1ca0 commit 6cb41bf

File tree

5 files changed

+32
-3
lines changed

5 files changed

+32
-3
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,29 @@ 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

208223
- name: Build Stagehand
209224
run: pnpm run build
210225

211226
- name: Run local E2E Tests (Deterministic Playwright)
212-
run: pnpm run e2e:local
227+
run: pnpm run e2e:local --log-order=stream
213228

214229
run-e2e-bb-tests:
215230
needs: [run-lint, run-build]
@@ -245,7 +260,7 @@ jobs:
245260
run: pnpm run build
246261

247262
- name: Run E2E Tests (browserbase)
248-
run: pnpm run e2e:bb
263+
run: pnpm run e2e:bb --log-order=stream
249264

250265
run-regression-evals:
251266
needs:

packages/core/lib/v3/tests/v3.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const v3TestConfig: V3Options = {
77
headless: true,
88
viewport: { width: 1288, height: 711 },
99
},
10+
selfHeal: false,
1011
verbose: 0,
1112
disablePino: true,
1213
logger: (line: LogLine) => console.log(line),

packages/core/lib/v3/tests/v3.dynamic.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export const v3DynamicTestConfig: V3Options =
2828
apiKey: process.env.BROWSERBASE_API_KEY!,
2929
projectId: process.env.BROWSERBASE_PROJECT_ID!,
3030
disableAPI: true,
31+
selfHeal: false,
3132
}
3233
: {
3334
...baseConfig,

packages/core/lib/v3/tests/v3.local.playwright.config.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ export default defineConfig({
2020
// Local development can use more workers for faster test runs.
2121
workers: process.env.CI ? 3 : 5,
2222
fullyParallel: true,
23+
projects: [
24+
{
25+
name: "default",
26+
testIgnore: /shadow-iframe\.spec\.ts$/,
27+
},
28+
{
29+
name: "shadow-iframe",
30+
testMatch: /shadow-iframe\.spec\.ts$/,
31+
workers: 2,
32+
fullyParallel: true,
33+
},
34+
],
2335
reporter: "list",
2436
use: {
2537
// we're not launching Playwright browsers in these tests; we connect via Puppeteer/CDP to V3.

packages/core/lib/v3/tests/xpath-for-location-deep.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ test.describe("resolveNodeForLocationDeep", () => {
2323

2424
await page.goto(
2525
"https://browserbase.github.io/stagehand-eval-sites/sites/iframe-hn/",
26+
{ waitUntil: "networkidle" },
2627
);
27-
await new Promise((resolve) => setTimeout(resolve, 1000));
2828

2929
// scroll to the bottom of the page
3030
await page.evaluate(() => {

0 commit comments

Comments
 (0)