39 lines
963 B
YAML
39 lines
963 B
YAML
|
|
name: CI
|
||
|
|
|
||
|
|
on:
|
||
|
|
push:
|
||
|
|
branches: [main]
|
||
|
|
pull_request:
|
||
|
|
branches: [main]
|
||
|
|
|
||
|
|
jobs:
|
||
|
|
backend-test:
|
||
|
|
runs-on: docker
|
||
|
|
container: node:20
|
||
|
|
steps:
|
||
|
|
- uses: actions/checkout@v4
|
||
|
|
- name: Install backend dependencies
|
||
|
|
working-directory: backend
|
||
|
|
run: npm ci --legacy-peer-deps || npm install --legacy-peer-deps
|
||
|
|
- name: Run backend tests
|
||
|
|
working-directory: backend
|
||
|
|
run: npm test
|
||
|
|
- name: Build backend
|
||
|
|
working-directory: backend
|
||
|
|
run: npm run build
|
||
|
|
|
||
|
|
frontend-test:
|
||
|
|
runs-on: docker
|
||
|
|
container: node:20
|
||
|
|
steps:
|
||
|
|
- uses: actions/checkout@v4
|
||
|
|
- name: Install frontend dependencies
|
||
|
|
working-directory: frontend
|
||
|
|
run: npm ci --legacy-peer-deps || npm install --legacy-peer-deps
|
||
|
|
- name: Run frontend tests
|
||
|
|
working-directory: frontend
|
||
|
|
run: npm test
|
||
|
|
- name: Build frontend
|
||
|
|
working-directory: frontend
|
||
|
|
run: npm run build
|