diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a7ae8e5..e176327 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -200,11 +200,10 @@ jobs: timeout-minutes: 2 run: | mv coverage/lcov.info coverage/lcov.base.info - lcov -r coverage/lcov.base.info -o coverage/lcov.base.info "lib/src/protobuf/client.*.dart" "lib/**/*.g.dart" - mv coverage/lcov.base.info coverage/lcov.info + lcov --remove coverage/lcov.base.info 'lib/src/protobuf/client.pb.dart' 'lib/src/model/pubspec.yaml.g.dart' -o coverage/lcov.info lcov --list coverage/lcov.info THRESHOLD=50 - COVERAGE=$(lcov --summary coverage.info | grep lines | tail -1 | awk '{print $4}' | sed 's/%//') + COVERAGE=$(lcov --summary coverage/lcov.info | grep lines | tail -1 | awk '{print $4}' | sed 's/%//') echo "Coverage is $COVERAGE%" echo $COVERAGE'<'$THRESHOLD | bc | grep -q 1 && echo "Coverage ($COVERAGE%) is below the threshold ($THRESHOLD%)" && exit 1 || echo "Coverage ($COVERAGE%) is above the threshold ($THRESHOLD%)"