mirror of
				https://github.com/flame-engine/flame.git
				synced 2025-10-31 08:56:01 +08:00 
			
		
		
		
	Adding coverage checking (#794)
* Adding coverage checking * Installing lcov on ci * printing summary * Update scripts/test.sh Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com> * Improving scripts * Update .github/pull_request_template.md Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net> * Update scripts/test.sh Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com> * reverting to pwd * Update scripts/test.sh Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com> * Updating changelog and min coverage Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com> Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net>
This commit is contained in:
		
							
								
								
									
										18
									
								
								scripts/check_coverage.dart
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								scripts/check_coverage.dart
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,18 @@ | ||||
| import 'dart:io'; | ||||
|  | ||||
| void main(args) { | ||||
|   final coverageSummary = args[0] as String; | ||||
|   final currentRaw = coverageSummary.replaceFirstMapped( | ||||
|       RegExp(r".* (\d+\.\d+)%.*"),  | ||||
|       (matches) => '${matches[1]}', | ||||
|   ); | ||||
|  | ||||
|   final current = double.parse(currentRaw); | ||||
|   final min = double.parse(args[1].replaceAll('\n', '')); | ||||
|  | ||||
|   if (current < min) { | ||||
|     exit(1); | ||||
|   } else { | ||||
|     exit(0); | ||||
|   } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Erick
					Erick