Skip to content

feat(www): Colin McDonnell “Cool project btw!” hero endorsement #4388

feat(www): Colin McDonnell “Cool project btw!” hero endorsement

feat(www): Colin McDonnell “Cool project btw!” hero endorsement #4388

Workflow file for this run

name: test
on:
pull_request:
branches: [dev, v1]
push:
branches: [dev, v1]
schedule:
- cron: "0 0 * * 6" # Every Saturday
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [lts/*, latest]
fail-fast: false
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.13
- name: Install dependencies
run: pnpm install
- name: Build packages
run: pnpm run build --filter=./packages/*
- run: pnpm run test
- name: Verify build artifacts
run: pnpm run verify-artifacts
- name: Run E2E package tests
run: pnpm run test:e2e:package
test-typesafety:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
- run: pnpm install
- run: pnpm run typecheck
test-build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [lts/*, latest]
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.13
- run: pnpm install
- run: pnpm run build
test-vite-compatibility:
runs-on: ubuntu-latest
strategy:
matrix:
vite-version: ["4", "5", "6", "7", "8"]
fail-fast: false
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: lts/*
cache: pnpm
- run: pnpm install
- name: Build workspace packages
run: pnpm run build:packages
- name: Apply overrides for Vite version
run: node scripts/override-vite.js ${{ matrix.vite-version }}
- name: Reinstall dependencies with overrides
run: pnpm install --no-frozen-lockfile
- name: Build vite-legacy playground
run: pnpm run build --filter=vite-legacy-playground
test-e2e:
runs-on: ubuntu-latest
timeout-minutes: 16
strategy:
matrix:
suite: [e2e]
fail-fast: false
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Set Turbo base/head for PRs
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "TURBO_SCM_BASE=${{ github.event.pull_request.base.sha || github.event.before }}" >> $GITHUB_ENV
echo "TURBO_SCM_HEAD=${{ github.sha }}" >> $GITHUB_ENV
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: lts/*
cache: pnpm
- run: pnpm install
- uses: actions/cache@v5
with:
path: ~/.cache/ms-playwright
key: ubuntu-latest-pw-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
ubuntu-latest-pw-
- name: Install Playwright browsers
# Chromium + Firefox only — matches playwright-www projects on Linux (webkit is macOS-only)
run: pnpm exec playwright install --with-deps chromium firefox
- name: Build www and dependencies
run: pnpm run build --filter=www...
- name: Run ${{ matrix.suite }} tests (PR)
if: ${{ github.event_name == 'pull_request' }}
run: pnpm run test:${{ matrix.suite }} --affected --log-order=stream
- name: Run ${{ matrix.suite }} tests (dev/workflow_dispatch)
if: ${{ github.event_name != 'pull_request' }}
run: pnpm run test:${{ matrix.suite }} --log-order=stream --filter="@repo/playwright-*"
- uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: test-results-${{ matrix.suite }}
path: "**/test-results/**"
retention-days: 30
test-windows:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(join(github.event.pull_request.labels.*.name, ','), 'windows')
runs-on: windows-latest
strategy:
matrix:
node-version: [lts/*, latest]
continue-on-error: ${{ matrix.node-version == 'latest' }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 2 # for checking against dev and for following the PR history
- name: Set Turbo base/head for PRs
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "TURBO_SCM_BASE=${{ github.event.pull_request.base.sha || github.event.before }}" >> $GITHUB_ENV
echo "TURBO_SCM_HEAD=${{ github.sha }}" >> $GITHUB_ENV
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.13
- name: Install dependencies
run: pnpm install
- uses: actions/cache@v5
with:
path: ~/.cache/ms-playwright
key: windows-latest-pw-${{ hashFiles('pnpm-lock.yaml') }}-${{ matrix.node-version }}
restore-keys: |
windows-latest-pw-${{ hashFiles('pnpm-lock.yaml') }}-
windows-latest-pw-
- name: Install Playwright browsers
run: pnpm exec playwright install --with-deps
- name: Sanitize node version for artifact name
id: sanitize
shell: bash
run: |
SANITIZED=$(echo "${{ matrix.node-version }}" | sed 's/[\/\*]/-/g')
echo "version=$SANITIZED" >> "$GITHUB_OUTPUT"
- run: pnpm build
- run: pnpm run test
- run: pnpm run test:e2e
- uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: test-results-windows-${{ steps.sanitize.outputs.version }}
path: "**/test-results/**"
retention-days: 30
test-macos:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(join(github.event.pull_request.labels.*.name, ','), 'macos')
runs-on: macos-latest
strategy:
matrix:
node-version: [lts/*, latest]
continue-on-error: ${{ matrix.node-version == 'latest' }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 2 # for checking against dev and for following the PR history
- name: Set Turbo base/head for PRs
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "TURBO_SCM_BASE=${{ github.event.pull_request.base.sha || github.event.before }}" >> $GITHUB_ENV
echo "TURBO_SCM_HEAD=${{ github.sha }}" >> $GITHUB_ENV
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.13
- name: Install dependencies
run: pnpm install
- uses: actions/cache@v5
with:
path: ~/.cache/ms-playwright
key: macos-latest-pw-${{ hashFiles('pnpm-lock.yaml') }}-${{ matrix.node-version }}
restore-keys: |
macos-latest-pw-${{ hashFiles('pnpm-lock.yaml') }}-
macos-latest-pw-
- name: Install Playwright browsers
run: pnpm exec playwright install --with-deps
- name: Sanitize node version for artifact name
id: sanitize
shell: bash
run: |
SANITIZED=$(echo "${{ matrix.node-version }}" | sed 's/[\/\*]/-/g')
echo "version=$SANITIZED" >> "$GITHUB_OUTPUT"
- run: pnpm build
- run: pnpm run test
- run: pnpm run test:e2e
- uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: test-results-macos-${{ steps.sanitize.outputs.version }}
path: "**/test-results/**"
retention-days: 30