Feat: Chemin log absolu dans résultat analyse #24
Workflow file for this run
This file contains hidden or 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: Qualité code - LogBuster | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - 'release/**' | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Étape 1 : Cloner le dépôt | |
| - name: Checkout du code | |
| uses: actions/checkout@v4 | |
| # Étape 2 : Installer Python | |
| - name: Configuration de Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| # Étape 3 : Installer les dépendances | |
| - name: Installation des dépendances | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| # Étape 4 : Lancement de l'analyse | |
| - name: Analyse avec Pylint (note >= 9.0 requise) | |
| run: | | |
| pylint app > tests-resultats-qualite.txt || true | |
| SCORE=$(grep "Your code has been rated at" tests-resultats-qualite.txt | awk '{print $7}' | cut -d"/" -f1) | |
| echo "Le score du code dans le dossier app est de $SCORE" | |
| SCORE_VALIDE=$(echo "$SCORE >= 9.0" | bc) | |
| if [ "$SCORE_VALIDE" -ne 1 ]; then | |
| echo "Erreur: La note du code est inférieur à 9." | |
| exit 1 | |
| fi | |
| # Sauvegarder l'artefact | |
| - name: Upload du rapport Pylint | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rapport-qualite-code | |
| path: tests-resultats-qualite.txt |