46 lines
870 B
YAML
46 lines
870 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '18'
|
|
cache: 'npm'
|
|
|
|
- name: Install root dependencies
|
|
run: |
|
|
npm ci
|
|
|
|
- name: Frontend install
|
|
working-directory: frontend
|
|
run: |
|
|
npm ci
|
|
|
|
- name: Frontend build
|
|
working-directory: frontend
|
|
run: |
|
|
npm run build
|
|
|
|
- name: Backend tests
|
|
working-directory: backend
|
|
run: |
|
|
npm test
|
|
|
|
- name: Upload frontend build artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: frontend-build
|
|
path: frontend/build
|