ci: fix pre-commit stage
This commit is contained in:
		
							
								
								
									
										11
									
								
								.github/workflows/main.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								.github/workflows/main.yml
									
									
									
									
										vendored
									
									
								
							@@ -14,11 +14,16 @@ on:
 | 
			
		||||
jobs:
 | 
			
		||||
  pre-commit:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
    - uses: actions/checkout@v2
 | 
			
		||||
    - name: pre-commit
 | 
			
		||||
      uses: pre-commit/action@v1.1.0
 | 
			
		||||
    - uses: actions/setup-python@v1
 | 
			
		||||
    - name: set PY
 | 
			
		||||
      run: echo "::set-env name=PY::$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')"
 | 
			
		||||
    - uses: actions/cache@v1
 | 
			
		||||
      with:
 | 
			
		||||
        path: ~/.cache/pre-commit
 | 
			
		||||
        key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
 | 
			
		||||
    - uses: pre-commit/action@v1.1.0
 | 
			
		||||
  lint:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user