mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 15:15:42 +00:00 
			
		
		
		
	add style checks
This commit is contained in:
		
							
								
								
									
										28
									
								
								.github/workflows/pr_checks.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										28
									
								
								.github/workflows/pr_checks.yaml
									
									
									
									
										vendored
									
									
								
							@@ -3,10 +3,19 @@
 | 
			
		||||
name: PR checks
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches-ignore:
 | 
			
		||||
      - l10*
 | 
			
		||||
 | 
			
		||||
  pull_request:
 | 
			
		||||
    branches-ignore:
 | 
			
		||||
      - l10*
 | 
			
		||||
 | 
			
		||||
inputs:
 | 
			
		||||
  python_version:
 | 
			
		||||
    description: “Python version”
 | 
			
		||||
    default: 3.7
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
 | 
			
		||||
  check_version:
 | 
			
		||||
@@ -19,3 +28,22 @@ jobs:
 | 
			
		||||
      - name: Check version number
 | 
			
		||||
        run: |
 | 
			
		||||
          python3 ci/check_version_number.py --branch ${{ github.base_ref }}
 | 
			
		||||
 | 
			
		||||
  pep_style:
 | 
			
		||||
    needs: check_version
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout code
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
      - name: Set up Python ${{inputs.python_version}}
 | 
			
		||||
        uses: actions/setup-python@v2
 | 
			
		||||
        with:
 | 
			
		||||
          python-version: ${{inputs.python_version}}
 | 
			
		||||
      - name: Install deps
 | 
			
		||||
        run: |
 | 
			
		||||
          pip install flake8==3.8.3
 | 
			
		||||
          pip install pep8-naming==0.11.1
 | 
			
		||||
      - name: flake8
 | 
			
		||||
        run: |
 | 
			
		||||
          flake8 InvenTree
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										34
									
								
								.github/workflows/style.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										34
									
								
								.github/workflows/style.yaml
									
									
									
									
										vendored
									
									
								
							@@ -1,34 +0,0 @@
 | 
			
		||||
name: Style Checks
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches-ignore:
 | 
			
		||||
      - l10*
 | 
			
		||||
 | 
			
		||||
  pull_request:
 | 
			
		||||
    branches-ignore:
 | 
			
		||||
      - l10*
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  style:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
 | 
			
		||||
    strategy:
 | 
			
		||||
      max-parallel: 4
 | 
			
		||||
      matrix:
 | 
			
		||||
        python-version: [3.7]
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout code
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
      - name: Set up Python ${{ matrix.python-version }}
 | 
			
		||||
        uses: actions/setup-python@v2
 | 
			
		||||
        with:
 | 
			
		||||
          python-version: ${{ matrix.python-version }}
 | 
			
		||||
      - name: Install deps
 | 
			
		||||
        run: |
 | 
			
		||||
          pip install flake8==3.8.3
 | 
			
		||||
          pip install pep8-naming==0.11.1
 | 
			
		||||
      - name: flake8
 | 
			
		||||
        run: |
 | 
			
		||||
          flake8 InvenTree
 | 
			
		||||
		Reference in New Issue
	
	Block a user