mirror of https://github.com/AMT-Cheif/drift.git
Switch to codecov, also report on moor_generator
This commit is contained in:
parent
aa6582ae79
commit
828ac8c23f
|
@ -6,6 +6,8 @@ import 'package:grinder/grinder_sdk.dart';
|
|||
import 'package:coverage/coverage.dart';
|
||||
import 'package:path/path.dart';
|
||||
|
||||
import 'format_coverage.dart' as fc;
|
||||
|
||||
const int _vmPort = 9876;
|
||||
|
||||
Future<void> main(List<String> args) async {
|
||||
|
@ -31,13 +33,5 @@ Future<void> main(List<String> args) async {
|
|||
print('coverage collected - formatting as lcov');
|
||||
|
||||
print('formatting to .lcov format');
|
||||
await Pub.runAsync('coverage:format_coverage', arguments: [
|
||||
'--lcov',
|
||||
'--packages=.packages',
|
||||
'--report-on=lib',
|
||||
'-i',
|
||||
'coverage.json',
|
||||
'-o',
|
||||
'lcov.info'
|
||||
]);
|
||||
await fc.main();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:coverage/coverage.dart';
|
||||
|
||||
Future main() async {
|
||||
Directory.current = Directory.current.parent;
|
||||
|
||||
final resolver = Resolver(
|
||||
packagesPath: 'moor/.packages',
|
||||
);
|
||||
|
||||
final coverage = await parseCoverage([File('moor/coverage.json')], 1);
|
||||
|
||||
// report coverage for the moor and moor_generator package
|
||||
final lcov = await LcovFormatter(
|
||||
resolver,
|
||||
reportOn: [
|
||||
'moor/lib/',
|
||||
'moor_generator/lib',
|
||||
],
|
||||
basePath: '.'
|
||||
).format(coverage);
|
||||
|
||||
File('moor/lcov.info').writeAsStringSync(lcov);
|
||||
}
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
if [ "$PKG" == "moor" ]; then
|
||||
pushd moor
|
||||
pub run coveralls lcov.info
|
||||
bash <(curl -s https://codecov.io/bash) -f lcov.info
|
||||
fi
|
Loading…
Reference in New Issue