mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 07:05:41 +00:00 
			
		
		
		
	CI updates (#6167)
* replaced flake8 with ruff mostly for speed improvements * fix codespell error * move config section * added isort again * move djlint config to pyproject * moved ruff section * remove flake8 from code base * remove flake8 from code base * fix djlint syntax * fix removed sections * fix requirements file * fix getattr useage * auto fixed docstring * adapted ruff settings to better fit code base * reorder order of operations * adjust checks * disable autofix/format * fixed reqs * remove flake8 section from setup.cfg * moved isort config * added missing toml req * fixed req * fixed source path
This commit is contained in:
		
							
								
								
									
										40
									
								
								.github/workflows/qc_checks.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										40
									
								
								.github/workflows/qc_checks.yaml
									
									
									
									
										vendored
									
									
								
							@@ -47,27 +47,11 @@ jobs:
 | 
			
		||||
            frontend:
 | 
			
		||||
              - 'src/frontend/**'
 | 
			
		||||
 | 
			
		||||
  pep_style:
 | 
			
		||||
    name: Style [Python]
 | 
			
		||||
    runs-on: ubuntu-20.04
 | 
			
		||||
 | 
			
		||||
    needs: paths-filter
 | 
			
		||||
    if: needs.paths-filter.outputs.server == 'true'
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4.1.1
 | 
			
		||||
      - name: Environment Setup
 | 
			
		||||
        uses: ./.github/actions/setup
 | 
			
		||||
        with:
 | 
			
		||||
          dev-install: true
 | 
			
		||||
      - name: Run flake8
 | 
			
		||||
        run: flake8 InvenTree --extend-ignore=D
 | 
			
		||||
 | 
			
		||||
  javascript:
 | 
			
		||||
    name: Style - Classic UI [JS]
 | 
			
		||||
    runs-on: ubuntu-20.04
 | 
			
		||||
 | 
			
		||||
    needs: [ 'pep_style', 'pre-commit' ]
 | 
			
		||||
    needs: [ 'pre-commit' ]
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4.1.1
 | 
			
		||||
@@ -167,27 +151,11 @@ jobs:
 | 
			
		||||
          invoke check-server
 | 
			
		||||
          coverage run -m unittest discover -s test/
 | 
			
		||||
 | 
			
		||||
  docstyle:
 | 
			
		||||
    name: Style [Python Docstrings]
 | 
			
		||||
    runs-on: ubuntu-20.04
 | 
			
		||||
 | 
			
		||||
    needs: pre-commit
 | 
			
		||||
    continue-on-error: true
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4.1.1
 | 
			
		||||
      - name: Environment Setup
 | 
			
		||||
        uses: ./.github/actions/setup
 | 
			
		||||
        with:
 | 
			
		||||
          install: true
 | 
			
		||||
      - name: Run flake8
 | 
			
		||||
        run: flake8 InvenTree --statistics
 | 
			
		||||
 | 
			
		||||
  coverage:
 | 
			
		||||
    name: Tests - DB [SQLite] + Coverage
 | 
			
		||||
    runs-on: ubuntu-20.04
 | 
			
		||||
 | 
			
		||||
    needs: [ 'pep_style', 'pre-commit' ]
 | 
			
		||||
    needs: [ 'pre-commit' ]
 | 
			
		||||
    continue-on-error: true # continue if a step fails so that coverage gets pushed
 | 
			
		||||
 | 
			
		||||
    env:
 | 
			
		||||
@@ -220,7 +188,7 @@ jobs:
 | 
			
		||||
  postgres:
 | 
			
		||||
    name: Tests - DB [PostgreSQL]
 | 
			
		||||
    runs-on: ubuntu-20.04
 | 
			
		||||
    needs: [ 'pep_style', 'pre-commit' ]
 | 
			
		||||
    needs: [ 'pre-commit' ]
 | 
			
		||||
 | 
			
		||||
    env:
 | 
			
		||||
      INVENTREE_DB_ENGINE: django.db.backends.postgresql
 | 
			
		||||
@@ -264,7 +232,7 @@ jobs:
 | 
			
		||||
    name: Tests - DB [MySQL]
 | 
			
		||||
    runs-on: ubuntu-20.04
 | 
			
		||||
 | 
			
		||||
    needs: [ 'pep_style', 'pre-commit' ]
 | 
			
		||||
    needs: [ 'pre-commit' ]
 | 
			
		||||
 | 
			
		||||
    env:
 | 
			
		||||
      # Database backend configuration
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user