-
Notifications
You must be signed in to change notification settings - Fork 19

Description
Is your feature request related to a problem? Please describe.
When I create new repositories, I often don't have any code to test but I like to still have my CI setup. This results in me failing the dart --test coverage=coverage
part of my CI. My solution is to now create new repositories with a test/test.dart
file with an empty test in it (please let me know if you believe there is a better way of handling this). However, this generates an empty lcov.info
file which results in the following error from very_good_coverage
: Error: lcov is empty!
Describe the solution you'd like
I'd like it if there was an option in this action to set the desired coverage amount for an empty coverage file. It could be an input with the following syntax:
empty_file_coverage: 100
Describe alternatives you've considered
The only alternative I can think of is creating actual fake tests (as opposed to the empty one I'm using) which I believe is bad practice.
Additional context
This is the full testing section of my CI
- name: Run tests with coverage
run: dart test --coverage=coverage && dart run coverage:format_coverage --packages=.dart_tool/package_config.json --lcov --in=coverage --out=coverage/lcov.info --report-on=lib
- name: Validate 100% coverage
uses: VeryGoodOpenSource/very_good_coverage@v1.2.1
Related Issues
#95 is a similar issue but wants 0% coverage on an empty file instead of 100%. Being able to set a custom amount for an empty coverage file seems to be useful for more situations than just my own.