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:
Erick
2021-05-18 11:42:31 -03:00
committed by GitHub
parent e4281d6471
commit 2dc47fe66a
7 changed files with 42 additions and 2 deletions

View 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);
}
}