Skip to content

chore(deploy): vps-monitor #209

chore(deploy): vps-monitor

chore(deploy): vps-monitor #209

Workflow file for this run

name: 'Tests Backend et Frontend'
on:
pull_request:
types: [opened, edited, synchronize]
push:
branches:
- main
- dev
jobs:
test-backend:
name: 'Tests Backend'
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:7
ports:
- 27017:27017
steps:
- name: 'Checkout code'
uses: actions/checkout@v4
- name: 'Setup Node.js'
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: saintBarthVolleyApp/backend/package-lock.json
- name: 'Installer les dépendances'
run: npm ci
working-directory: saintBarthVolleyApp/backend
- name: 'Lancer les tests backend'
run: npm test
working-directory: saintBarthVolleyApp/backend
env:
NODE_ENV: test
MONGO_URI: mongodb://localhost:27017/sbv_test
JWT_SECRET: test_secret_ci
PORT: 5000
test-frontend:
name: 'Build Frontend (vérification)'
runs-on: ubuntu-latest
steps:
- name: 'Checkout code'
uses: actions/checkout@v4
- name: 'Setup Node.js'
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: saintBarthVolleyApp/frontend/package-lock.json
- name: 'Installer les dépendances'
run: npm ci
working-directory: saintBarthVolleyApp/frontend
- name: 'Build Next.js'
run: npm run build
working-directory: saintBarthVolleyApp/frontend
env:
# Pas de basePath en CI, pas besoin de l'URL de prod
NEXT_BASE_PATH: ''
NEXT_PUBLIC_API_URL: ''