Ajout du pipeline complet pour tests

This commit is contained in:
2025-01-04 13:16:30 +01:00
parent 01e61a67ee
commit 56d1a2b340

View File

@@ -7,15 +7,37 @@ trigger:
- push - push
- pull_request - pull_request
steps: steps:
# Étape 1 : Installer les dépendances
- name: install-dependencies - name: install-dependencies
image: python:3.10-slim image: python:3.10-slim
commands: commands:
- pip install -r requirements.txt - pip install -r requirements.txt
# Étape 2 : Linting (vérification du style de code)
- name: lint
image: python:3.10-slim
commands:
- pip install flake8
- flake8 . --max-line-length=88
# Étape 3 : Tests unitaires
- name: run-tests - name: run-tests
image: python:3.10-slim image: python:3.10-slim
commands: commands:
- pip install -r requirements.txt # Assure l'installation des dépendances ici aussi - pip install -r requirements.txt
- pytest tests/ - pytest tests/
# Étape 4 : Tests d'intégration (si applicable)
- name: integration-tests
image: python:3.10-slim
commands:
- pip install -r requirements.txt
- python integration_tests.py
# Étape 5 : Analyse des vulnérabilités (optionnel)
- name: security-check
image: python:3.10-slim
commands:
- pip install bandit
- bandit -r .