Merge pull request #17 from LucasR65/main #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI/CD Pipeline | |
on: | |
push: | |
branches: | |
- "*" # Déclenche le workflow à chaque push sur toutes les branches | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest # Utilise une machine Ubuntu pour l'exécution du workflow | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 # Action pour récupérer le code du dépôt | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 # Action pour configurer Node.js | |
with: | |
node-version: '14' # Version de Node.js à utiliser | |
- name: Install dependencies | |
run: npm install # Installation des dépendances du projet | |
- name: Clean cache | |
run: npm cache clean --force | |
- name: Run tests | |
run: npm test -- --passWithNoTests # Exécution des tests |