Public Access
56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
|
|
jobs:
|
|
backend:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: ./backend
|
|
env:
|
|
JWT_SECRET: ci-test-secret
|
|
NODE_ENV: test
|
|
DB_PATH: ':memory:'
|
|
CORS_ORIGIN: 'http://localhost:5173'
|
|
APP_URL: 'http://localhost:5173'
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
cache: 'npm'
|
|
cache-dependency-path: ./backend/package-lock.json
|
|
- run: npm ci
|
|
- name: Type check
|
|
run: npx tsc --noEmit
|
|
- name: Build
|
|
run: npm run build
|
|
- name: Run tests
|
|
run: npm test
|
|
|
|
frontend:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: ./frontend
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
cache: 'npm'
|
|
cache-dependency-path: ./frontend/package-lock.json
|
|
- run: npm ci --legacy-peer-deps
|
|
- name: Lint
|
|
run: npm run lint
|
|
- name: Type check
|
|
run: npx tsc -b --noEmit
|
|
- name: Build
|
|
run: npm run build
|
|
- name: Run tests
|
|
run: npm run test:run
|