Skip to content

docs: add bun create invocation #29

docs: add bun create invocation

docs: add bun create invocation #29

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check:
name: Typecheck, Test & Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
# Pin bun version for reproducible builds. Update periodically.
bun-version: "1.3.10"
# Cache bun dependencies
- name: Cache bun modules
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: bun-${{ runner.os }}-
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Typecheck
run: bun run typecheck
- name: Typecheck tests
run: tsc --noEmit -p tsconfig.test.json
- name: Test
run: bun run test --run
- name: Build
run: bun run build
- name: Get Playwright version
id: pw-version
run: echo "version=$(bunx playwright --version)" >> "$GITHUB_OUTPUT"
# Cache Playwright browsers separately (large, changes rarely)
- name: Cache Playwright browsers
uses: actions/cache@v4
id: playwright-cache
with:
path: ~/.cache/ms-playwright
# Key on Playwright version only — avoids invalidating ~400MB browser cache on unrelated dep changes
key: playwright-${{ runner.os }}-${{ steps.pw-version.outputs.version }}
- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: bunx playwright install --with-deps chromium
# Still need system deps even on cache hit
- name: Install Playwright system deps
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: bunx playwright install-deps chromium
- name: E2E tests
run: bun run test:e2e