chore(deps): update actions/checkout action to v7 #214
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: Check Code Quality | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout code | |
| uses: actions/checkout@v7 | |
| - name: ⚡ Installer uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "pyproject.toml" | |
| - name: 🐍 Configurer Python 3.12 | |
| run: uv python install 3.12 | |
| - name: 📦 Installer les dépendances | |
| run: uv sync --all-groups | |
| - name: 🧹 Linting & Analyse Statique (Ruff) | |
| run: | | |
| # Remplace flake8. Vérifie les erreurs de syntaxe, imports inutilisés, etc. | |
| uv run ruff check . --output-format=github | |
| - name: 🎨 Vérification du formatage (Ruff) | |
| run: | | |
| # Remplace Black. Échoue si le code n'est pas correctement formaté. | |
| uv run ruff format . --check | |
| - name: 🧪 Tests unitaires (Pytest) | |
| run: | | |
| if [ -d "tests" ]; then | |
| # Stoppe l'exécution après 3 erreurs fatales pour gagner du temps | |
| uv run pytest --maxfail=3 -v | |
| else | |
| echo "⚠️ Pas de dossier 'tests' trouvé. Échec forcé pour exiger des tests." | |
| exit 1 | |
| fi |