🧭 ci: Use System Chrome for Mock E2E (#13481)
Some checks are pending
GitNexus Index / index (push) Waiting to run
GitNexus Index / post-index (push) Blocked by required conditions
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Waiting to run
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Blocked by required conditions
Sync Helm Chart Tags / Ignore non-main push (push) Waiting to run
Sync Helm Chart Tags / Sync chart tags (push) Waiting to run

This commit is contained in:
Danny Avila 2026-06-02 22:07:10 -04:00 • committed by GitHub
parent 2ef7bdfbc2
commit d680763db3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 16 deletions

View file

@ -18,12 +18,15 @@ concurrency:
env:
NODE_OPTIONS: '--max-old-space-size=${{ secrets.NODE_MAX_OLD_SPACE_SIZE || 6144 }}'
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
jobs:
e2e:
name: Tier-1 smoke (headless Chromium)
name: Tier-1 smoke (headless Chrome)
runs-on: ubuntu-latest
timeout-minutes: 30
env:
E2E_CHROMIUM_CHANNEL: chrome
steps:
- uses: actions/checkout@v4
@ -105,19 +108,11 @@ jobs:
if: steps.cache-client-app.outputs.cache-hit != 'true'
run: npm run build:client
- name: Resolve Playwright version
id: pw
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> "$GITHUB_OUTPUT"
- name: Cache Playwright browsers
id: cache-playwright
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.pw.outputs.version }}
- name: Install Playwright Chromium
run: npx playwright install --with-deps chromium
- name: Install Playwright runtime dependencies
timeout-minutes: 5
run: |
google-chrome --version
npx playwright install-deps chrome
- name: Run mock-LLM Tier-1 e2e
run: npx playwright test --config=e2e/playwright.config.mock.ts

View file

@ -14,6 +14,7 @@ const baseURL = getE2EBaseURL();
const mockLlmPort = getMockLlmPort();
const defaultMockLlmBaseURL = 'http://127.0.0.1:8889/v1';
const mockLlmBaseURL = `http://127.0.0.1:${mockLlmPort}/v1`;
const chromiumChannel = process.env.E2E_CHROMIUM_CHANNEL || undefined;
const vanillaOverrides = {
TENANT_ISOLATION_STRICT: 'false',
@ -119,8 +120,11 @@ export default defineConfig({
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
name: chromiumChannel ?? 'chromium',
use: {
...devices['Desktop Chrome'],
...(chromiumChannel ? { channel: chromiumChannel } : {}),
},
},
],
webServer: [

View file

@ -6,6 +6,7 @@ import dotenv from 'dotenv';
dotenv.config();
const timeout = Number(process.env.E2E_AUTH_TIMEOUT ?? 15000);
const chromiumChannel = process.env.E2E_CHROMIUM_CHANNEL || undefined;
async function register(page: Page, user: User) {
await page.getByRole('link', { name: 'Sign up' }).click();
@ -50,6 +51,7 @@ async function authenticate(config: FullConfig, user: User) {
const browser = await chromium.launch({
headless: config.projects[0].use.headless ?? true,
...(chromiumChannel ? { channel: chromiumChannel } : {}),
});
try {
const page = await browser.newPage();