55 lines
1.2 KiB
YAML
55 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
pull_request:
|
|
branches: [main, master]
|
|
|
|
jobs:
|
|
lint-and-test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '18'
|
|
cache: 'npm'
|
|
|
|
- name: Install frontend dependencies
|
|
run: npm ci
|
|
|
|
- name: Run ESLint
|
|
run: npm run lint
|
|
continue-on-error: true
|
|
|
|
- name: Run TypeScript type check
|
|
run: npm run type-check
|
|
|
|
- name: Run frontend tests
|
|
run: npm run test:run
|
|
continue-on-error: true
|
|
|
|
- name: Build frontend
|
|
run: npm run build
|
|
|
|
- name: Install backend dependencies
|
|
working-directory: ./backend
|
|
run: npm ci
|
|
|
|
- name: Run backend tests
|
|
working-directory: ./backend
|
|
run: npm run test:run
|
|
continue-on-error: true
|
|
|
|
- name: Test Summary
|
|
if: always()
|
|
run: |
|
|
echo "✅ CI Pipeline Complete"
|
|
echo "📦 Frontend built successfully"
|
|
echo "🧪 Tests executed (check logs for results)"
|