3
0
Fork 0
mirror of https://code.forgejo.org/actions/checkout.git synced 2026-01-13 23:26:16 +00:00

Ajout du workflow CI TP et du fichier .nvmrc

This commit is contained in:
lFesselier 2026-01-05 14:22:30 +01:00
parent 8e8c483db8
commit ec453d466b
2 changed files with 36 additions and 0 deletions

35
.github/workflows/ci.yaml vendored Normal file
View file

@ -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

1
.nvmrc Normal file
View file

@ -0,0 +1 @@
18