From ec453d466bc839815d9aee427d0bd70c97576b3e Mon Sep 17 00:00:00 2001 From: lFesselier Date: Mon, 5 Jan 2026 14:22:30 +0100 Subject: [PATCH 1/3] Ajout du workflow CI TP et du fichier .nvmrc --- .github/workflows/ci.yaml | 35 +++++++++++++++++++++++++++++++++++ .nvmrc | 1 + 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/ci.yaml create mode 100644 .nvmrc diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 000000000..18384a24f --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,35 @@ +name: CI Pipeline + +# Déclenche la pipeline à chaque PR et push sur master +on: + pull_request: + branches: [ master ] + push: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + # 1️⃣ Checkout du repo + - name: Checkout repository + uses: actions/checkout@v4 + + # 2️⃣ Installer Node.js selon .nvmrc + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + + # 3️⃣ Installer les dépendances de manière reproductible + - name: Install dependencies + run: npm ci + + # 4️⃣ Lancer les tests unitaires + - name: Run unit tests + run: npm test + + # 5️⃣ Linter le code + - name: Lint code + run: npm run lint diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 000000000..3c032078a --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +18 From d9f6b7b1f9303c0c4fb672a6a37ed073d3830abe Mon Sep 17 00:00:00 2001 From: lFesselier Date: Mon, 5 Jan 2026 14:27:43 +0100 Subject: [PATCH 2/3] modiy master main --- .github/workflows/ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 18384a24f..4badee6bf 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,11 +1,11 @@ name: CI Pipeline -# Déclenche la pipeline à chaque PR et push sur master +# Déclenche la pipeline à chaque PR et push sur main on: pull_request: - branches: [ master ] + branches: [ main ] push: - branches: [ master ] + branches: [ main ] jobs: build: From 563d1318de578906d2256a9e9acba32aa2a0ce59 Mon Sep 17 00:00:00 2001 From: lFesselier Date: Mon, 5 Jan 2026 14:31:31 +0100 Subject: [PATCH 3/3] fix nvmrc --- .nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index 3c032078a..a45fd52cc 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18 +24