Skip to content

Simplify testing configuration#238

Merged
yamcodes merged 12 commits intomainfrom
231-simplify-testing-configuration-testsyml-and-playwrightconfigts
Oct 20, 2025
Merged

Simplify testing configuration#238
yamcodes merged 12 commits intomainfrom
231-simplify-testing-configuration-testsyml-and-playwrightconfigts

Conversation

@yamcodes
Copy link
Owner

@yamcodes yamcodes commented Oct 17, 2025

  • Simplified the GitHub Actions workflow by consolidating job steps and removing redundant configurations, enhancing readability and maintainability.
  • Updated Playwright configuration to streamline test execution settings, including conditional parameters for CI environments.
  • Improved caching strategies and artifact handling across different operating systems to optimize CI performance.

These changes aim to enhance the efficiency and clarity of the CI/CD pipeline while ensuring robust testing practices.

Closes #231

Summary by CodeRabbit

  • Chores

    • Modernized CI workflow triggers, scheduling, quoting, caching keys, concurrency, and artifact retention for more consistent automation.
  • Tests

    • Reworked E2E: added Playwright version resolution, containerized runs, matrix-driven OS/Node jobs, unified dependency and browser install steps, and standardized per-OS artifact names/paths.
  • Refactor

    • Centralized CI-aware test configuration to unify CI/local behavior, simplify retries/workers, and improve parallel test execution.

- Simplified the GitHub Actions workflow by consolidating job steps and removing redundant configurations, enhancing readability and maintainability.
- Updated Playwright configuration to streamline test execution settings, including conditional parameters for CI environments.
- Improved caching strategies and artifact handling across different operating systems to optimize CI performance.

These changes aim to enhance the efficiency and clarity of the CI/CD pipeline while ensuring robust testing practices.
@yamcodes yamcodes linked an issue Oct 17, 2025 that may be closed by this pull request
@changeset-bot
Copy link

changeset-bot bot commented Oct 17, 2025

⚠️ No Changeset found

Latest commit: cc24da9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Oct 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
arkenv Error Error Oct 20, 2025 7:02am

💡 Enable Vercel Agent with $100 free credit for automated AI reviews

@yamcodes yamcodes added the tests This issue or PR is about adding, removing or changing tests label Oct 17, 2025
@github-actions github-actions bot added github actions Pull requests that update GitHub Actions code and removed tests This issue or PR is about adding, removing or changing tests labels Oct 17, 2025
@yamcodes yamcodes added infra Infrastructure related issue or pull request tests This issue or PR is about adding, removing or changing tests and removed github actions Pull requests that update GitHub Actions code labels Oct 17, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 17, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Consolidates and simplifies CI test workflows (.github/workflows/tests.yml) with a resolve-playwright-version job, matrixed OS/Node test jobs, unified pnpm/setup-node steps and standardized artifacts; centralizes Playwright CI behavior via an isCi flag in tooling/playwright-www/playwright.config.ts.

Changes

Cohort / File(s) Summary
CI Workflow
​.github/workflows/tests.yml
Rewrites workflow triggers/cron formatting, adds resolve-playwright-version job with outputs, consolidates checkout/pnpm/setup-node with caching, introduces matrixed OS/Node test jobs, consolidates Playwright browser install per-OS, and renames artifacts to test-results-* with path **/test-results/**.
Playwright config
tooling/playwright-www/playwright.config.ts
Introduces isCi from env and centralizes CI flags (forbidOnly, retries, workers), removes scattered explicit timeout/maxFailures overrides, standardizes projects (chromium/firefox/webkit desktop), and toggles webServer reuse based on isCi.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Dev as Developer / PR
  participant GH as GitHub Actions
  participant Resolve as resolve-playwright-version
  participant Runner as Job Runner (matrix OS/Node)
  participant PW as Playwright

  rect rgb(245,250,255)
    Note over GH,Resolve: Trigger: push/PR to `main` or scheduled cron
  end

  Dev->>GH: push / PR / schedule
  GH->>Resolve: start resolve-playwright-version job
  Resolve-->>GH: output: PLAYWRIGHT_VERSION
  GH->>Runner: start matrixed test jobs (use PLAYWRIGHT_VERSION)
  Runner->>Runner: checkout, pnpm/action-setup, setup-node (pnpm cache)
  alt E2E job
    Runner->>Runner: pnpm install deps & pnpm exec playwright install --with-deps
    Runner->>PW: run Playwright tests (env: isCi=true)
  else unit/integration jobs
    Runner->>Runner: pnpm test / build steps
  end
  Runner->>Runner: collect **/test-results/** artifacts
  Runner->>GH: upload artifacts (e.g., test-results-e2e, test-results-<os>-...)
  GH->>Dev: status + artifact links
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

www

Poem

🐰 I hopped through YAML, neat and spry,

Trimmed the jobs and waved goodbye.
Playwright tuned, artifacts in tow,
Tests now march in tidy row. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "Simplify testing configuration" directly and accurately reflects the main changes in the PR. Both modified files—.github/workflows/tests.yml and tooling/playwright-www/playwright.config.ts—are explicitly being simplified by consolidating redundant steps, removing unnecessary flags, and streamlining configurations. The title is concise, clear, and specific enough for a teammate to understand the primary change when scanning history.
Linked Issues Check ✅ Passed The code changes align well with the objectives stated in linked issue #231. The PR successfully simplifies the testing workflow configuration by consolidating job steps and removing redundant configurations across both tests.yml and playwright.config.ts. Unnecessary flags have been removed from the Playwright config (e.g., explicit maxFailures, per-test timeouts), and the setup now relies on sensible defaults while reducing overall complexity. The changes maintain functionality across different operating systems and environments while improving maintainability and readability of the configuration files.
Out of Scope Changes Check ✅ Passed All changes in the pull request appear to be within scope of the stated objective to simplify testing configuration. The modifications to tests.yml focus on consolidating job steps, improving artifact naming, and streamlining caching strategies—all supporting the simplification effort. Similarly, changes to playwright.config.ts remove unnecessary flags, centralize CI-specific configuration, and streamline project settings. The operational improvements in caching and artifact handling are integral to the simplification work rather than separate unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e453eb5 and cc24da9.

📒 Files selected for processing (1)
  • .github/workflows/tests.yml (3 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

- Added comments to the `fetch-depth` parameter in the checkout step to clarify its purpose in relation to the base branch.
- Included a comment regarding the `--affected` flag in the Turbo setup step to provide additional context for users.

These changes aim to enhance the readability and understanding of the workflow configuration.
@github-actions github-actions bot added github actions Pull requests that update GitHub Actions code and removed tests This issue or PR is about adding, removing or changing tests labels Oct 17, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
.github/workflows/tests.yml (2)

98-131: Minor: Redundant CI environment variable.

Line 125 sets CI: true, but GitHub Actions already sets this automatically. While harmless, it's redundant.

Consider removing the explicit env block:

-        env:
-          CI: true

133-166: Minor: Redundant CI environment variable.

Line 160 sets CI: true, which is already set by GitHub Actions. This is the same redundancy as in the Windows job.

Consider removing the explicit env block:

-        env:
-          CI: true
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a7935d5 and a471bd8.

📒 Files selected for processing (2)
  • .github/workflows/tests.yml (3 hunks)
  • tooling/playwright-www/playwright.config.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
tooling/playwright-www/playwright.config.ts (2)
tooling/playwright-www/tests/integrations.spec.ts (1)
  • test (4-157)
tooling/playwright-www/tests/quickstart.spec.ts (1)
  • test (4-181)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test-e2e
🔇 Additional comments (7)
tooling/playwright-www/playwright.config.ts (3)

17-30: LGTM! Clean browser configuration.

The simplified browser setup using standard Playwright device descriptors is a good improvement. The removal of browser-specific timeout overrides suggests previous workarounds are no longer necessary.


32-37: LGTM! Appropriate server reuse logic.

The reuseExistingServer: !isCi configuration correctly ensures fresh server instances in CI while allowing local development to reuse existing servers for faster iteration.


3-10: Verify whether workers: 1 in CI is intentional.

The configuration explicitly sets workers: 1 in CI, which serializes all 9 test files across 3 browser projects. This constraint was not documented or explained in the codebase. While this may be intentional (for debugging or stability), consider confirming with maintainers whether it should remain or be adjusted (e.g., to 2-4 workers) to improve CI execution time, especially given the 12-minute timeout expectation and adequate ubuntu-latest resources.

.github/workflows/tests.yml (4)

3-10: LGTM! Clean trigger configuration.

The simplified branch specification and annotated cron schedule improve readability without changing functionality.


19-34: LGTM! Streamlined test job configuration.

The consolidated setup steps using modern GitHub Actions and built-in pnpm caching are well-structured. Testing against both LTS and latest Node versions ensures good coverage.


36-65: LGTM! Consistent job simplification.

Both jobs follow the same streamlined pattern. The pinned Node 22 version for type checking ensures consistent type validation, and the Bun setup in the build job indicates efficient build tooling.


67-97: Verify the 12-minute timeout with serialized test execution in live workflow runs.

The verification script could not access GitHub Actions data in the sandbox environment. However, the underlying concern remains valid: with workers: 1 in playwright.config.ts, E2E tests execute serially, and the 12-minute timeout may be insufficient if the test suite grows.

Recommended action: Review recent test-e2e job executions in your GitHub Actions runs to confirm completion times consistently stay well below 12 minutes. If approaching the timeout, increase it or optimize test parallelization.

- Renamed artifact uploads for end-to-end tests, Windows, and macOS to include specific identifiers (`test-results-e2e`, `test-results-windows`, `test-results-macos`) for better clarity and organization.
- This change enhances the management of test results across different platforms in the CI/CD pipeline.
… names

- Modified the artifact names for Windows and macOS test results to include the Node.js version from the matrix, enhancing clarity and organization of test results.
- This change improves the management of artifacts in the CI/CD pipeline by clearly associating them with the specific Node.js version used during testing.
…ctions workflow for improved clarity and simplicity.
…wser installation

- Renamed the step for installing Playwright browsers to improve readability and understanding of the workflow.
- This change aims to provide clearer context for the installation process within the CI/CD pipeline.
- Introduced a new job to resolve and output the Playwright version, improving version management in the CI pipeline.
- Updated the `test-e2e` job to depend on the resolved Playwright version, ensuring the correct browser version is used during tests.
- Removed the step for installing Playwright browsers, streamlining the workflow and reducing unnecessary steps.

These changes aim to improve the efficiency and clarity of the end-to-end testing process.
- Modified cache keys for Playwright browser installations on Windows and macOS to incorporate the Node.js version from the matrix, improving cache management and efficiency.
- This change enhances the clarity and organization of the caching mechanism in the CI/CD pipeline.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/tests.yml (1)

33-33: Consider using --frozen-lockfile in all pnpm install commands.

Only the resolve-playwright-version job (line 81) uses pnpm install --frozen-lockfile, while other jobs use plain pnpm install. Using --frozen-lockfile in CI is a best practice to ensure reproducible builds and prevent unexpected dependency updates between runs.

Apply this pattern to all pnpm install calls in the workflow:

- - run: pnpm install
+ - run: pnpm install --frozen-lockfile

This should be applied to lines 33, 45, 64, 109, 142, and 182.

Also applies to: 45-45, 64-64, 109-109, 142-142, 182-182

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7471dc0 and e453eb5.

📒 Files selected for processing (1)
  • .github/workflows/tests.yml (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test-e2e
🔇 Additional comments (3)
.github/workflows/tests.yml (3)

116-121: Artifact naming now correctly prevents collisions.

The artifact names are now unique and properly include matrix context (test-results-e2e, test-results-windows-${{ matrix.node-version }}, test-results-macos-${{ matrix.node-version }}), successfully resolving the previous collision issue flagged in earlier reviews. The glob pattern "**/test-results/**" correctly captures results from all monorepo packages.

Also applies to: 155-160, 195-200


67-87: Playwright version resolution is well-structured.

The new resolve-playwright-version job uses a clean approach: it skips browser downloads during install (via PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD), then extracts the exact version from the @playwright/test package.json. This version is then used to pull the correct container image in the test-e2e job, ensuring consistency between local and containerized test environments.


27-34: Standardize setup-node version across all jobs.

The workflow inconsistently uses setup-node@v5 in test, test-typesafety, and test-build jobs, but setup-node@v6 in resolve-playwright-version, test-e2e, test-windows, and test-macos jobs. This pattern indicates an incomplete migration rather than a deliberate choice, as the new resolve-playwright-version job and its dependents use v6 while older jobs remain on v5.

While this doesn't cause functional issues (all jobs explicitly configure cache: pnpm as required by v6's breaking changes), standardizing on a single version is recommended for consistency and maintainability. Consider upgrading the remaining jobs to v6.

@yamcodes yamcodes merged commit ecc6822 into main Oct 20, 2025
13 of 15 checks passed
@yamcodes yamcodes deleted the 231-simplify-testing-configuration-testsyml-and-playwrightconfigts branch October 20, 2025 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github actions Pull requests that update GitHub Actions code infra Infrastructure related issue or pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplify testing configuration (tests.yml and playwright.config.ts)

1 participant