48 lines
864 B
YAML
48 lines
864 B
YAML
name: Build and Test
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build-and-test:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [20.x]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: 'npm'
|
|
|
|
- name: Install Dependencies
|
|
run: npm run install:all
|
|
|
|
- name: Lint Frontend
|
|
run: |
|
|
cd frontend
|
|
npm run lint
|
|
|
|
- name: Build Frontend
|
|
run: |
|
|
cd frontend
|
|
npm run build
|
|
|
|
- name: Build Backend
|
|
run: |
|
|
cd backend
|
|
npm run build
|
|
|
|
- name: Test Backend
|
|
run: |
|
|
cd backend
|
|
npm run test -- run
|