Modern QA2026Configuring Cross-Browser CI — tiles
Log inJoin
40 / 66 · 09 Mobile & Cross-Platform Testing · Browser Testing Strategy← prev⊞ allnext →☰ Read as one page

7.4Configuring Cross-Browser CI

# .github/workflows/cross-browser.yml
name: Cross-Browser Tests
on:
  pull_request:
    # Tier 1: every PR
  schedule:
    - cron: '0 6 * * 1'  # Tier 2: weekly on Monday
    - cron: '0 6 1 * *'  # Tier 3: monthly on 1st

jobs:
  tier-1:
    if: github.event_name == 'pull_request'
    runs-on: ubuntu-latest
    strategy:
      matrix:
        browser: [chromium, firefox, webkit]
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npx playwright install --with-deps ${{ matrix.browser }}
      - run: npx playwright test --project=${{ matrix.browser }}

  tier-2:
    if: github.event_name == 'schedule' || github.event_name == 'pull_request'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npx playwright install --with-deps
      - run: npx playwright test --config=playwright.config.tier2.ts

  tier-3:
    if: github.event.schedule == '0 6 1 * *'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - name: Run on BrowserStack
        env:
          BROWSERSTACK_USER: ${{ secrets.BS_USER }}
          BROWSERSTACK_KEY: ${{ secrets.BS_KEY }}
        run: npx playwright test --config=playwright.config.tier3.ts