Update README.md #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Vérifier le code | |
uses: actions/checkout@v2 | |
- name: Installer Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: Installer les dépendances | |
run: npm install | |
working-directory: backend | |
- name: Donner les permissions d'exécution à vitest | |
run: chmod +x node_modules/.bin/vitest | |
working-directory: backend | |
- name: Lancer le backend | |
run: | | |
nohup node app.mjs & # Exécuter en arrière-plan | |
sleep 5 # Attendre quelques secondes pour s'assurer que le serveur est prêt | |
working-directory: backend/src | |
- name: Exécuter les tests | |
run: npm run test | |
working-directory: backend |