platform/.melos/coverage.yaml

18 lines
901 B
YAML
Raw Permalink Normal View History

2024-10-21 04:52:47 +00:00
scripts:
_: &coverage_scripts
coverage:
run: >
melos exec -c 1 --fail-fast -- "dart pub add --dev coverage && dart test --coverage=coverage && dart pub global activate coverage && dart pub global run coverage:format_coverage -l --packages=.dart_tool/package_config.json --report-on=lib/ -i coverage -o coverage/lcov.info && dart pub remove coverage"
description: Run tests with coverage and generate LCOV report for each package
coverage_report:
run: >
melos exec -c 1 --fail-fast -- "
if [ -s coverage/lcov.info ]; then
genhtml -o coverage_report coverage/lcov.info;
echo 'Coverage report generated successfully.';
else
echo 'No valid coverage data found. Skipping report generation.';
fi
"
description: Generate HTML coverage report from LCOV data for each package, if valid data exists