• wwwillchen-bot's avatar
    feat: make Playwright retries configurable via env var (#2558) · a07fe7ce
    wwwillchen-bot 提交于
    ## Summary
    - Add PLAYWRIGHT_RETRIES env var support to allow different retry counts
    for different CI environments
    - Self-hosted macOS runners now use 1 retry (more reliable hardware)
    while GitHub-hosted runners use 2 retries
    - Refactors playwright.config.ts to read retries from environment
    variable with sensible defaults
    
    ## Test plan
    - Verify CI workflow sets PLAYWRIGHT_RETRIES appropriately for
    self-hosted vs GitHub-hosted runners
    - Run `npm test` to ensure all unit tests pass
    - E2E tests should respect the new retry configuration
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    <!-- devin-review-badge-begin -->
    
    ---
    
    <a href="https://app.devin.ai/review/dyad-sh/dyad/pull/2558"
    target="_blank">
      <picture>
    <source media="(prefers-color-scheme: dark)"
    srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
    <img
    src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
    alt="Open with Devin">
      </picture>
    </a>
    <!-- devin-review-badge-end -->
    
    
    <!-- This is an auto-generated description by cubic. -->
    ---
    ## Summary by cubic
    Make Playwright retries configurable via the PLAYWRIGHT_RETRIES env var
    to tune test stability across environments. Self-hosted macOS runners
    use 1 retry; GitHub-hosted runners use 2 (local stays 0 unless set).
    
    - **New Features**
      - Added PLAYWRIGHT_RETRIES with sensible defaults (CI 2, local 0).
    - CI sets retries per runner type: 1 for self-hosted macOS, 2 for
    GitHub-hosted.
    
    <sup>Written for commit 896a3dbcbb8278d5cedfbd27088466d780d05fd2.
    Summary will update on new commits.</sup>
    
    <!-- End of auto-generated description by cubic. -->
    Co-authored-by: 's avatarWill Chen <willchen90@gmail.com>
    Co-authored-by: 's avatarClaude Opus 4.5 <noreply@anthropic.com>
    a07fe7ce
playwright.config.ts 2.1 KB