diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4b7dc04..26f2cd67 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,9 +56,19 @@ jobs: run: pnpm test:unit run e2e: - timeout-minutes: 60 - # Playwright 1.60 can't install browsers on ubuntu-latest (26.04) yet. + name: e2e (${{ matrix.project }}) + timeout-minutes: 30 runs-on: ubuntu-24.04 + # The browsers and their system libraries come with the image, so nothing + # is installed from apt on each run. Keep the tag on the exact + # @playwright/test version in pnpm-lock.yaml. + container: + image: mcr.microsoft.com/playwright:v1.60.0-noble + options: --user 1001 + strategy: + fail-fast: false + matrix: + project: [chromium, firefox, webkit] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -77,17 +87,15 @@ jobs: ${{ runner.os }}-pnpm-store- - name: Install dependencies run: pnpm install - - name: Install Playwright Browsers - run: pnpm exec playwright install --with-deps - name: Run Playwright tests - run: pnpm exec playwright test + run: pnpm exec playwright test --project=${{ matrix.project }} env: ASTRO_DB_REMOTE_URL: ${{ secrets.ASTRO_DB_REMOTE_URL }} ASTRO_DB_APP_TOKEN: ${{ secrets.ASTRO_DB_APP_TOKEN }} - uses: actions/upload-artifact@v4 if: always() with: - name: playwright-report + name: playwright-report-${{ matrix.project }} path: playwright-report/ retention-days: 30 diff --git a/CLAUDE.md b/CLAUDE.md index 4ddd7fa5..4b5fb907 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -20,7 +20,7 @@ Whatnot podcast). - **Lint fix:** `pnpm lint:fix` - **All tests:** `pnpm test` (runs unit + e2e concurrently) - **Unit tests only:** `pnpm test:unit` (Vitest) -- **Single unit test:** `pnpm exec vitest run tests/unit/Player.test.tsx` +- **Single unit test:** `pnpm exec vitest run tests/unit/Dock.test.tsx` - **E2E tests only:** `pnpm test:e2e` (Playwright, auto-starts dev server) - **Seed remote DB:** `pnpm db:seed` - **Push schema to DB:** `pnpm db:push` @@ -64,9 +64,24 @@ connection is configured in `db/index.ts`. `Accept: text/markdown` clients, and the styled 404 page otherwise. API routes return structured JSON errors via `src/lib/api-errors.ts`. - `src/components/` — Mix of `.astro` (static) and `.tsx` (Preact interactive) - components. The audio player (`src/components/player/`) and search dialog are + components. The media player (`src/components/media/`) and search dialog are Preact. -- `src/components/state.ts` — Preact signals for shared player state. +- `src/components/state.ts` — Preact signals for shared player state + (current episode, Watch/Listen preference, playback readouts). +- `src/components/media/engine.ts` — one persistent `