diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5fde46db..20a8c76b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -155,7 +155,6 @@ jobs: timeout-minutes: 5 outputs: console: ${{ steps.filter.outputs.console }} - browsers: ${{ steps.filter.outputs.browsers }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: @@ -181,13 +180,6 @@ jobs: else echo "console=false" >>"$GITHUB_OUTPUT" fi - # Most console failures are Firefox- or WebKit-only, so a change to the UI or its - # specs runs every browser; any other change runs Chromium. - if printf '%s\n' "$changed" | grep -q -E '^(ui/|e2e/console/|playwright\.config\.ts$)'; then - echo "browsers=all" >>"$GITHUB_OUTPUT" - else - echo "browsers=chromium" >>"$GITHUB_OUTPUT" - fi console-lane: name: Console (${{ matrix.shard }}/4) @@ -217,24 +209,11 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile --ignore-scripts - name: Install Playwright browsers - env: - BROWSERS: ${{ needs.changes.outputs.browsers }} - run: | - if [ "$BROWSERS" = chromium ]; then - pnpm exec playwright install --with-deps chromium - else - pnpm exec playwright install --with-deps chromium firefox webkit - fi + run: pnpm exec playwright install --with-deps chromium - name: Browser lane env: - BROWSERS: ${{ needs.changes.outputs.browsers }} SHARD: ${{ matrix.shard }} - run: | - if [ "$BROWSERS" = chromium ]; then - pnpm test:console --project=chromium --shard="$SHARD/4" - else - pnpm test:console --shard="$SHARD/4" - fi + run: pnpm test:console --project=chromium --shard="$SHARD/4" # why: branch protection requires the check named Console, so this job stands for the sharded # lane. `always()` makes it report a failure when a shard fails, where a job skipped by a failed diff --git a/src/test-lanes.test.ts b/src/test-lanes.test.ts index 9ab72cf39..733518843 100644 --- a/src/test-lanes.test.ts +++ b/src/test-lanes.test.ts @@ -168,7 +168,7 @@ function ciJobs(ci: string): ReadonlyMap { const CONSOLE_SHARDS_AT_LEAST = 4; describe("the console lane in CI (.github/workflows/ci.yml)", () => { - it("runs the console lane over a matrix of at least four shards, each passing its `--shard=/` in both browser modes, and the required `Console` check needs that job and fails when it does not pass", () => { + it("runs the console lane over a matrix of at least four Chromium-only shards, and the required `Console` check needs that job and fails when it does not pass", () => { const ci = readFileSync(join(REPO_ROOT, ".github/workflows/ci.yml"), "utf8"); const jobs = [...ciJobs(ci)]; const lanes = jobs.filter(([, job]) => job.includes("pnpm test:console")); @@ -181,7 +181,10 @@ describe("the console lane in CI (.github/workflows/ci.yml)", () => { CONSOLE_SHARDS_AT_LEAST, ); const runs = lane.match(/pnpm test:console[^\n]*/g) ?? []; - expect(runs, "the lane's chromium-only and every-browser commands").toHaveLength(2); + expect(runs, "the lane's Chromium-only command").toHaveLength(1); + expect(runs[0]).toContain("--project=chromium"); + expect(lane).not.toMatch(/firefox|webkit|macos/i); + expect(lane).toContain("runs-on: ubuntu-24.04"); expect(lane, "the shard index comes from the matrix").toMatch( /\n {10}SHARD: \$\{\{ matrix\.shard \}\}/, );