Actualiser .gitea/workflows/ci.yml
CI-CD NDF Complet / test-and-quality (push) Has been cancelled
CI-CD NDF Complet / deploy (push) Has been cancelled

This commit is contained in:
2026-05-07 16:56:56 +02:00
parent da14b26f10
commit 9cee6f1ed1
+42
View File
@@ -0,0 +1,42 @@
name: CI-CD NDF Complet
run-name: Pipeline exécuté par ${{ github.actor }}
on:
push:
branches:
- master
jobs:
test-and-quality:
runs-on: ubuntu-latest
steps:
- name: Récupération du code
uses: actions/checkout@v3
with:
fetch-depth: 0
# 1. ÉTAPE DES TESTS (Obligatoire pour un bon rapport Sonar)
- name: Installation et Tests Node.js
run: |
npm install
npm test -- --coverage --watchAll=false
# 2. ÉTAPE SONARQUBE
- name: Analyse SonarQube
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
with:
args: >
-Dsonar.projectKey=ndf-gitea
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
deploy:
needs: test-and-quality # On ne déploie QUE si les tests et Sonar sont OK
runs-on: ubuntu-latest
steps:
- name: Déploiement sur Portainer
run: |
echo "Ici on lance le script curl pour mettre à jour ta stack Portainer"
# On utilisera ton script node ou curl ici