Skip to content

docs: Add testing patterns to CLAUDE.md #19

docs: Add testing patterns to CLAUDE.md

docs: Add testing patterns to CLAUDE.md #19

Workflow file for this run

name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Validate JSON translations
run: |
echo "Validating translation files..."
for f in src/i18n/generated/*.json; do
python3 -c "import json; json.load(open('$f'))" && echo "✓ $f" || { echo "✗ $f"; exit 1; }
done
echo "All JSON files valid!"
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Build site
run: npm run build
- name: Run Playwright tests
run: npx playwright test --project=chromium
env:
BASE_URL: http://localhost:4321
CI: true
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 7