Skip to content

Enhance Turbo configuration and GitHub Actions workflow#237

Merged
yamcodes merged 10 commits intomainfrom
235-optimize-testsyml
Oct 17, 2025
Merged

Enhance Turbo configuration and GitHub Actions workflow#237
yamcodes merged 10 commits intomainfrom
235-optimize-testsyml

Conversation

@yamcodes
Copy link
Owner

@yamcodes yamcodes commented Oct 17, 2025

  • Added passThroughEnv for SENTRY_AUTH_TOKEN in turbo.json to ensure the environment variable is accessible during builds.
  • Implemented workflow-level concurrency control in tests.yml to cancel previous runs when new commits are pushed, improving CI efficiency.

These updates aim to streamline the build process and enhance the CI workflow.

Summary by CodeRabbit

Release Notes

  • Chores
    • Enhanced CI/CD pipeline with improved test execution reliability and performance optimizations.
    • Streamlined build configuration for better consistency across environments.

- Added `passThroughEnv` for `SENTRY_AUTH_TOKEN` in turbo.json to ensure the environment variable is accessible during builds.
- Implemented workflow-level concurrency control in tests.yml to cancel previous runs when new commits are pushed, improving CI efficiency.

These updates aim to streamline the build process and enhance the CI workflow.
@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: df278a6

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 Ready Ready Preview Comment Oct 17, 2025 6:33pm

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 17, 2025

Warning

Rate limit exceeded

@yamcodes has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 0 minutes and 20 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 816d712 and df278a6.

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

Walkthrough

The PR updates the CI workflow to dynamically resolve Playwright version from package.json, run E2E tests in a container based on that version, switch Node.js selection to dynamic LTS, and enable PNPM caching. Turbo.json is updated to pass through SENTRY_AUTH_TOKEN to the build task.

Changes

Cohort / File(s) Summary
CI Workflow Configuration
.github/workflows/tests.yml
Adds workflow-level concurrency control. Introduces new resolve-playwright-version job to read Playwright version from package.json and expose as output. Adds new test-e2e job that depends on resolver job, runs tests in container from resolved Playwright version, and enables PNPM caching. Replaces static Node.js pinning with dynamic LTS selection. Removes explicit Playwright browser caching and installation steps. Renames artifact from playwright-report to test-results. Updates environment variables: removes explicit CI and timeout vars, adds PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD.
Build Task Configuration
turbo.json
Adds passThroughEnv: ["SENTRY_AUTH_TOKEN"] to build task for improved environment variable propagation.

Sequence Diagram

sequenceDiagram
    participant GHA as GitHub Actions
    participant Resolver as resolve-playwright-version
    participant Builder as Container Builder
    participant Tester as test-e2e Job
    
    GHA->>Resolver: Trigger job
    Resolver->>Resolver: Read @playwright/test version from package.json
    Resolver-->>GHA: Export version output
    
    GHA->>Builder: Trigger container build with resolved version
    Builder-->>Builder: Build/select Playwright container image
    Builder-->>Tester: Container ready
    
    Tester->>Tester: Set PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=true
    Tester->>Tester: Install dependencies (PNPM cached)
    Tester->>Tester: Run E2E tests in container
    Tester-->>GHA: Upload test-results artifact
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

The workflow changes involve substantial structural modifications including new job orchestration, dynamic version resolution, container-based execution, and dependency management. The turbo.json change is simple, but the workflow updates require careful review of job dependencies, environment variable propagation, and CI pipeline impact.

Possibly related PRs

Suggested labels

arkenv

Poem

🐰 A rabbit hops through CI, so spry,
Playwright versions resolve on the fly,
In containers they dance, so neat,
With PNPM caching so fleet,
E2E tests pass—hip, hip, hooray! 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "Enhance Turbo configuration and GitHub Actions workflow" is partially related to the changeset, referring to real parts of the changes but with overly broad language. The title accurately identifies the two main files being modified—turbo.json and tests.yml—and correctly characterizes the nature of the changes as enhancements to their respective configurations. However, the use of the generic term "Enhance" lacks specificity about the actual improvements, such as workflow-level concurrency control, Playwright version resolution, or the SENTRY_AUTH_TOKEN passthrough environment variable that represent the core objectives of this PR.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

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.

@github-actions github-actions bot added the github actions Pull requests that update GitHub Actions code label Oct 17, 2025
- Introduced a new job to resolve the Playwright version dynamically, ensuring compatibility with the latest updates.
- Updated the E2E testing job to depend on the resolved Playwright version, improving consistency in test environments.
- Adjusted Node.js version specification to use the latest LTS version.
- Modified artifact upload paths for better organization of test results.

These changes aim to streamline the testing process and enhance the reliability of E2E tests.
@yamcodes yamcodes marked this pull request as ready for review October 17, 2025 18:03
@yamcodes yamcodes added the tests This issue or PR is about adding, removing or changing tests label Oct 17, 2025
…iguration

- Changed the fetch-depth in the checkout action to 0, allowing for complete history retrieval to enhance affected detection.
- Added a step to configure Git for proper affected detection, ensuring the workflow operates smoothly in various environments.

These updates aim to optimize the CI process and improve the accuracy of affected file detection during pull requests.
@github-actions github-actions bot removed the tests This issue or PR is about adding, removing or changing tests label Oct 17, 2025
- Eliminated the Git configuration step for affected detection, streamlining the workflow.
- Maintained the fetch-depth setting to ensure complete history retrieval for accurate affected file detection.

This change aims to simplify the CI process while retaining essential functionality.
…ssions

- Changed the user option in the container configuration from root to a non-root user (1001) for improved security.
- Adjusted the fetch-depth in the checkout action from 0 to 2, enhancing the workflow's efficiency while still allowing for adequate history retrieval.

These modifications aim to streamline the CI process and enhance security in the testing environment.
- Removed unnecessary HOME and CI environment variables from the testing job configuration.
- Simplified the setup for Playwright by retaining only essential environment variables.

These changes aim to enhance the clarity and efficiency of the CI workflow.
- Eliminated the concurrency configuration to simplify the workflow.
- This change aims to enhance clarity and reduce potential conflicts in job execution.
…10 to 12 minutes to accommodate longer test execution times.
@yamcodes yamcodes merged commit a7935d5 into main Oct 17, 2025
11 of 12 checks passed
@yamcodes yamcodes deleted the 235-optimize-testsyml branch October 17, 2025 18:33
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimize tests.yml

1 participant