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