Ajout du pipeline complet pour tests
This commit is contained in:
26
.drone.yml
26
.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 .
|
||||
|
||||
Reference in New Issue
Block a user