Skip to content

[CI] - Use fewer runners for e2e testing #1789

[CI] - Use fewer runners for e2e testing

[CI] - Use fewer runners for e2e testing #1789

Workflow file for this run

name: E2E Tests
on:
pull_request:
branches: [main, next]
jobs:
run-tests:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
node-version: [18.13.0, 20, 22]
# When not on main, exclude non-latest node version and macOS/Windows
isMain:
- ${{ github.base_ref == 'main' }}
exclude:
- isMain: false
node-version: 20
name: e2e/${{ matrix.os }}/node-${{ matrix.node-version}}
runs-on: ${{ matrix.os }}
steps:
- name: Set OS environment variable
run: echo "__E2E_WORKFLOW_OS__=${{ matrix.os }}" >> $GITHUB_ENV
- name: Checkout Repo
uses: actions/checkout@v4
- name: Action Setup (pnpm)
uses: pnpm/action-setup@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install Playwright and browsers
run: pnpm playwright install --with-deps
- name: Run setup
run: pnpm --filter "./e2e/*" run --if-present setup
- name: Run sources
run: pnpm --filter "./e2e/*" run sources
- name: Run dev mode tests
run: pnpm --filter "./e2e/*" --sequential run test:dev
- name: Build
run: pnpm --filter "./e2e/*" run build
- name: Run preview mode tests
run: pnpm --filter "./e2e/*" --sequential run test:preview
- name: Upload Playwright reports
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report__e2e_${{ matrix.os }}_node-${{ matrix.node-version }}
path: e2e/**/playwright-report