grinder_coveralls 0.2.0 grinder_coveralls: ^0.2.0 copied to clipboard
Grinder plug-in collecting your code coverage as LCOV and uploading it to the Coveralls service.
import 'package:grinder/grinder.dart';
import 'package:grinder_coveralls/grinder_coveralls.dart' as coveralls;
@Task('Collects and uploads the coverage data in one pass')
Future<void> collectAndUploadCoverage() async =>
coveralls.uploadCoverage(await coveralls.collectCoverage(getDir('test'), reportOn: [libDir.path]));
@Task('Collects the coverage data and saves it as LCOV format')
Future<void> collectCoverage() =>
coveralls.collectCoverage(getDir('test'), reportOn: [libDir.path], saveAs: 'path/to/lcov.info');
@Task('Uploads the LCOV coverage report to the Coveralls service')
Future<void> uploadCoverage() async =>
coveralls.uploadCoverage(await getFile('path/to/lcov.info').readAsString());