Skip to content

fix

fix #58

Workflow file for this run

name: Full Stack CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
backend:
name: Backend CI
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
mongodb-version: ['6.0']
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'BACKEND/package-lock.json'
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.10.0
with:
mongodb-version: ${{ matrix.mongodb-version }}
- name: Install Backend Dependencies
run: |
cd BACKEND
npm ci
- name: Build Backend
run: |
cd BACKEND
npm run build
- name: Test Backend
run: |
cd BACKEND
npm test
env:
CI: true
JWT_SECRET: test_secret
MONGODB_URI: mongodb://localhost:27017/test_db
frontend:
name: Frontend CI
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'FRONTEND/package-lock.json'
- name: Install Frontend Dependencies
run: |
cd FRONTEND
npm ci
- name: Lint Frontend
run: |
cd FRONTEND
npm run lint
- name: Build Frontend
run: |
cd FRONTEND
npm run build
- name: Test Frontend
run: |
cd FRONTEND
npm run test