added lints as github-workflow
This commit is contained in:
		
							parent
							
								
									6b6a361489
								
							
						
					
					
						commit
						47b9e8dc4c
					
				|  | @ -0,0 +1,46 @@ | ||||||
|  | --- | ||||||
|  | 
 | ||||||
|  | name: AutoLint | ||||||
|  | 
 | ||||||
|  | on: | ||||||
|  |   push: | ||||||
|  |     branches: [main, stable] | ||||||
|  |   pull_request: | ||||||
|  |     branches: [main, stable] | ||||||
|  | 
 | ||||||
|  | jobs: | ||||||
|  |   build: | ||||||
|  |     strategy: | ||||||
|  |       matrix: | ||||||
|  |         python-version: [3.10] | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  | 
 | ||||||
|  |     steps: | ||||||
|  |       - name: Checkout | ||||||
|  |         uses: actions/checkout@v3 | ||||||
|  | 
 | ||||||
|  |       - name: Switch to Current Branch | ||||||
|  |         run: git checkout ${{ env.BRANCH }} | ||||||
|  |         shell: bash | ||||||
|  | 
 | ||||||
|  |       - name: Install python | ||||||
|  |         uses: actions/setup-python@v4 | ||||||
|  |         with: | ||||||
|  |           python-version: '3.10' | ||||||
|  | 
 | ||||||
|  |       - name: Install dependencies | ||||||
|  |         run: | | ||||||
|  |           pip install -r requirements_lint.txt | ||||||
|  |         shell: bash | ||||||
|  | 
 | ||||||
|  |       - name: Running PyLint | ||||||
|  |         run: pylint --recursive=y . | ||||||
|  |         shell: bash | ||||||
|  | 
 | ||||||
|  |       - name: Running YamlLint | ||||||
|  |         run: yamllint . | ||||||
|  |         shell: bash | ||||||
|  | 
 | ||||||
|  |       - name: Running AnsibleLint | ||||||
|  |         run: ansible-lint -c .ansible-lint.yml | ||||||
|  |         shell: bash | ||||||
|  | @ -0,0 +1,5 @@ | ||||||
|  | # pip requirements | ||||||
|  | yamllint | ||||||
|  | pylint | ||||||
|  | ansible-core | ||||||
|  | ansible-lint | ||||||
		Loading…
	
		Reference in New Issue