Skip to content

deps(deps-dev): bump vitest and @vitest/coverage-v8 to v4 #360

deps(deps-dev): bump vitest and @vitest/coverage-v8 to v4

deps(deps-dev): bump vitest and @vitest/coverage-v8 to v4 #360

Workflow file for this run

name: PR Checks
on:
pull_request:
branches: [main]
types: [opened, synchronize, closed]
paths-ignore:
- '**.md'
- 'docs/**'
# Cancel in-progress runs when new commits are pushed OR when PR is closed/merged
concurrency:
group: pr-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
test:
# Skip if PR is closed - concurrency will cancel in-progress runs
if: github.event.action != 'closed'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Cache MDX compilation
uses: actions/cache@v5
with:
path: .cache/mdx
key: mdx-${{ hashFiles('package-lock.json', 'scripts/precompile-mdx.ts', 'src/content/blog/schema.ts', 'content/blog/**/*.txt') }}
restore-keys: |
mdx-
- name: Security audit
run: npm audit --audit-level=high --omit=dev
continue-on-error: true # Don't block PRs on advisories; report only
- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache@v5
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('package-lock.json') }}
- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: npx playwright install chromium --with-deps
- name: Install Playwright deps only
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps chromium
- name: Lint
run: npm run lint
- name: Type check
run: npx tsc --noEmit
- name: Unit tests
run: npm test
- name: Build
run: npm run build
- name: Start preview server
run: npm run preview &
- name: Wait for server
run: npx wait-on http://localhost:4173 --timeout 30000
- name: Smoke tests
run: BASE_URL=http://localhost:4173 npx playwright test --grep @smoke
- name: Upload test results on failure
if: failure()
uses: actions/upload-artifact@v7
with:
name: playwright-report
path: playwright-report/
retention-days: 7