From 56d1a2b340decea454583ad1402870c41c36396e Mon Sep 17 00:00:00 2001 From: Gilles Soulier Date: Sat, 4 Jan 2025 13:16:30 +0100 Subject: [PATCH] Ajout du pipeline complet pour tests --- .drone.yml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 6566f6f..bd6b15a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,15 +7,37 @@ trigger: - push - pull_request - steps: + # Étape 1 : Installer les dépendances - name: install-dependencies image: python:3.10-slim commands: - 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 image: python:3.10-slim commands: - - pip install -r requirements.txt # Assure l'installation des dépendances ici aussi + - pip install -r requirements.txt - 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 .