This commit is contained in:
		
							
								
								
									
										20
									
								
								.drone.yml
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								.drone.yml
									
									
									
									
									
								
							@@ -21,12 +21,30 @@ steps:
 | 
				
			|||||||
  image: python:3
 | 
					  image: python:3
 | 
				
			||||||
  commands:
 | 
					  commands:
 | 
				
			||||||
  - pip3 install pylint bandit mccabe
 | 
					  - pip3 install pylint bandit mccabe
 | 
				
			||||||
  - pip3 install -r requirements.txt
 | 
					  - pip3 install --cache-dir='./.pipcache' -r requirements.txt
 | 
				
			||||||
  - find . -name "*.py" -exec python3 -m py_compile '{}' \;
 | 
					  - find . -name "*.py" -exec python3 -m py_compile '{}' \;
 | 
				
			||||||
  - find . -name "*.py" -exec pylint '{}' + || if [ $? -eq 1 ]; then echo "you fail"; fi
 | 
					  - find . -name "*.py" -exec pylint '{}' + || if [ $? -eq 1 ]; then echo "you fail"; fi
 | 
				
			||||||
  - find . -name "*.py" -exec python3 -m mccabe --min 3 '{}' + || if [ $? -eq 1 ]; then echo "you fail"; fi
 | 
					  - find . -name "*.py" -exec python3 -m mccabe --min 3 '{}' + || if [ $? -eq 1 ]; then echo "you fail"; fi
 | 
				
			||||||
  - bandit -r . + || if [ $? -eq 1 ]; then echo "you fail"; fi
 | 
					  - bandit -r . + || if [ $? -eq 1 ]; then echo "you fail"; fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- name: unit_test
 | 
				
			||||||
 | 
					  image: python:3.8
 | 
				
			||||||
 | 
					  environment:
 | 
				
			||||||
 | 
					    PRODUCER_REDIS: cache
 | 
				
			||||||
 | 
					  commands:
 | 
				
			||||||
 | 
					  - pip3 install --cache-dir='./.pipcache' -r requirements.txt
 | 
				
			||||||
 | 
					  - pytest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- name: coverage
 | 
				
			||||||
 | 
					  image: python:3.8
 | 
				
			||||||
 | 
					  environment:
 | 
				
			||||||
 | 
					    PRODUCER_REDIS: cache
 | 
				
			||||||
 | 
					  commands:
 | 
				
			||||||
 | 
					    - pip3 install --cache-dir='./.pipcache' -r requirements.txt
 | 
				
			||||||
 | 
					    - pip3 install --cache-dir='./.pipcache' coverage pytest
 | 
				
			||||||
 | 
					    - coverage run -m pytest
 | 
				
			||||||
 | 
					    - coverage report -m
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: build-app
 | 
					- name: build-app
 | 
				
			||||||
  image: banzaicloud/drone-kaniko
 | 
					  image: banzaicloud/drone-kaniko
 | 
				
			||||||
  settings:
 | 
					  settings:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user