Move coverage uploading into same Cirrus task

This commit is contained in:
Simon Binder 2019-07-28 10:32:31 +02:00
parent 884f5053a0
commit 47a032c645
No known key found for this signature in database
GPG Key ID: 7891917E4147B8C0
2 changed files with 3 additions and 14 deletions

View File

@ -3,15 +3,10 @@ container:
image: "google/dart:latest"
task:
name: Analysis and Tests
pub_cache:
folder: $HOME/.pub-cache
pub_get_script: tool/pub_get.sh
analyze_script: tool/analyze.sh
test_moor_script: tool/test_moor.sh
test_sqlparser_script: tool/test_sqlparser.sh
upload_coverage_task:
name: Upload coverage
depends_on: [task]
format_coverage_script: tool/upload_coverage.sh
format_coverage_script: tool/upload_coverage.sh

View File

@ -9,16 +9,10 @@ Future main() async {
packagesPath: 'moor/.packages',
);
final potentialFiles = [
final coverage = await parseCoverage([
File('moor/coverage.json'),
File('sqlparser/coverage.json'),
];
final existingFiles = [
for (var file in potentialFiles) if (file.existsSync()) file
];
final coverage = await parseCoverage(existingFiles, 1);
], 1);
// report coverage for the moor and moor_generator package
final lcov = await LcovFormatter(