File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Qualité code - LogBuster
2+
3+ on :
4+ push :
5+ branches :
6+ - develop
7+
8+ jobs :
9+ lint :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout du code
14+ uses : actions/checkout@v4
15+
16+ - name : Configuration de Python
17+ uses : actions/setup-python@v4
18+ with :
19+ python-version : ' 3.x'
20+
21+ - name : Installation des dépendances
22+ run : |
23+ python -m pip install --upgrade pip
24+ pip install pylint
25+ pip install colorama
26+
27+ - name : Analyse avec Pylint (note >= 9.0 requise)
28+ run : |
29+ pylint app > tests-resultats-qualite.txt || true
30+ SCORE=$(grep "Your code has been rated at" tests-resultats-qualite.txt | awk '{print $7}' | cut -d"/" -f1)
31+ echo "Le score du code dans le dossier app est de $SCORE"
32+ SCORE_VALIDE=$(echo "$SCORE >= 9.0" | bc)
33+ if [ "$SCORE_VALIDE" -ne 1 ]; then
34+ echo "Erreur: La note du code est inférieur à 9."
35+ exit 1
36+ fi
37+
38+ - name : Upload du rapport Pylint
39+ uses : actions/upload-artifact@v4
40+ with :
41+ name : rapport-qualite-code
42+ path : tests-resultats-qualite.txt
You can’t perform that action at this time.
0 commit comments