Skip to content

feat: add GitHub Actions workflow and Claude integration setup #4

feat: add GitHub Actions workflow and Claude integration setup

feat: add GitHub Actions workflow and Claude integration setup #4

Workflow file for this run

name: PR Tests
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
# TODO: Re-enable type checking after fixing remaining TypeScript errors
# Tracked in follow-up issue
# - name: Type check
# run: npm run type-check
- name: Run unit tests
run: npm test
- name: Build core package for E2E tests
run: npm run build:core
- name: Setup D1 database for tests
run: |
cd my-sonicjs-app
npx wrangler d1 migrations apply DB --local --yes || true
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: Run E2E tests
run: npm run e2e
env:
CI: true
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report/
retention-days: 7
- name: Upload test videos
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-videos
path: test-results/
retention-days: 7