mirror of
https://github.com/actions/checkout.git
synced 2026-01-18 22:08:56 +08:00
Ajout du workflow CI TP et du fichier .nvmrc
This commit is contained in:
parent
8e8c483db8
commit
ec453d466b
2 changed files with 36 additions and 0 deletions
35
.github/workflows/ci.yaml
vendored
Normal file
35
.github/workflows/ci.yaml
vendored
Normal 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
1
.nvmrc
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
18
|
||||||
Loading…
Add table
Add a link
Reference in a new issue