mirror of
				https://git.collinwebdesigns.de/oscar.krause/fastapi-dls.git
				synced 2025-10-26 18:05:28 +03:00 
			
		
		
		
	added code-quality and test-coverage
This commit is contained in:
		
							parent
							
								
									c1d541f7c6
								
							
						
					
					
						commit
						210a36c07f
					
				| @ -1,3 +1,6 @@ | |||||||
|  | include: | ||||||
|  |   - template: Jobs/Code-Quality.gitlab-ci.yml | ||||||
|  | 
 | ||||||
| cache: | cache: | ||||||
|   key: one-key-to-rule-them-all |   key: one-key-to-rule-them-all | ||||||
| 
 | 
 | ||||||
| @ -179,6 +182,30 @@ test:archlinux: | |||||||
|     - pacman -Sy |     - pacman -Sy | ||||||
|     - pacman -U --noconfirm *.pkg.tar.zst |     - pacman -U --noconfirm *.pkg.tar.zst | ||||||
| 
 | 
 | ||||||
|  | code_quality: | ||||||
|  |   rules: | ||||||
|  |     - if: $CODE_QUALITY_DISABLED | ||||||
|  |       when: never | ||||||
|  |     - if: $CI_PIPELINE_SOURCE == "merge_request_event" | ||||||
|  |     - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH | ||||||
|  | 
 | ||||||
|  | test_coverage: | ||||||
|  |   extends: test | ||||||
|  |   rules: | ||||||
|  |     - if: $CI_PIPELINE_SOURCE == "merge_request_event" | ||||||
|  |     - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH | ||||||
|  |   script: | ||||||
|  |     - pip install pytest pytest-cov | ||||||
|  |     - coverage run -m pytest | ||||||
|  |     - coverage report | ||||||
|  |     - coverage xml | ||||||
|  |   coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/' | ||||||
|  |   artifacts: | ||||||
|  |     reports: | ||||||
|  |       coverage_report: | ||||||
|  |         coverage_format: cobertura | ||||||
|  |         path: '**/coverage.xml' | ||||||
|  | 
 | ||||||
| .deploy: | .deploy: | ||||||
|   rules: |   rules: | ||||||
|     - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH |     - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Oscar Krause
						Oscar Krause