Ajout d'un workflow Gitea
pour le linting et le formatage du code sur la branche de `dev` uniquement. See: [#196](https://forge.chapril.org/jmtrivial/agenda_culturel/issues/196)
This commit is contained in:
		
							
								
								
									
										43
									
								
								.gitea/workflows/lint-format.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								.gitea/workflows/lint-format.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,43 @@
 | 
			
		||||
name: Lint and Format
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches:
 | 
			
		||||
      - dev
 | 
			
		||||
  pull_request:
 | 
			
		||||
    branches:
 | 
			
		||||
      - dev
 | 
			
		||||
 | 
			
		||||
env:
 | 
			
		||||
  SRC_DIRS: "src experimentations"
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  lint-format:
 | 
			
		||||
    name: Run Linter and Formatter
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout Repository
 | 
			
		||||
        uses: actions/checkout@v4
 | 
			
		||||
 | 
			
		||||
      - name: Run Ruff Fix
 | 
			
		||||
        uses: chartboost/ruff-action@v1
 | 
			
		||||
        with:
 | 
			
		||||
          src: ${{ env.SRC_DIRS }}
 | 
			
		||||
          args: --fix
 | 
			
		||||
 | 
			
		||||
      - name: Run Ruff Check
 | 
			
		||||
        uses: chartboost/ruff-action@v1
 | 
			
		||||
        with:
 | 
			
		||||
          src: ${{ env.SRC_DIRS }}
 | 
			
		||||
 | 
			
		||||
      - name: Run Black Formatting
 | 
			
		||||
        uses: psf/black@stable
 | 
			
		||||
        with:
 | 
			
		||||
          src: ${{ env.SRC_DIRS }}
 | 
			
		||||
 | 
			
		||||
      - name: Run Black Check
 | 
			
		||||
        uses: psf/black@stable
 | 
			
		||||
        with:
 | 
			
		||||
          src: ${{ env.SRC_DIRS }}
 | 
			
		||||
          options: --check
 | 
			
		||||
		Reference in New Issue
	
	Block a user