Skip to content


Use this GitHub Action with your project

Add this Action to an existing workflow or create a new one.

View on Marketplace
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.

Very Good Coverage

Very Good Ventures Very Good Ventures

Developed with πŸ’™ by Very Good Ventures πŸ¦„

ci License: MIT

A GitHub Action which helps enforce a minimum code coverage threshold.


Very Good Coverage accepts the following configuration inputs:

Input name Description Default value Optional
path The absolute path to the file. "/coverage/" βœ…
min_coverage The minimum coverage percentage allowed. Must be a number between 0 and 100. 100 βœ…
exclude List of paths to exclude from the coverage report, separated by an empty space. Supports globs to describe file patterns. "" βœ…

Example usage

uses: VeryGoodOpenSource/very_good_coverage@v2
  path: '/coverage/'
  min_coverage: 95
  exclude: '**/*_observer.dart **/change.dart'


How can I avoid Very Good Coverage reporting an empty or non-existent coverage file?

Relevant issue

A failure for non-existent coverage file can be resolved by setting the path input to match the location of the already generated lcov file.

uses: VeryGoodOpenSource/very_good_coverage@v2
  path: 'my_project/coverage/'

If your generated lcov file is empty this might be because you have no test files or your tests are not generating any coverage data.

If you wish to always bypass these warnings, we recommend using a conditional statement in your workflow to avoid running the Very Good Coverage action when the lcov file is empty or non-existent.

For example, if your non-existent or empty coverage file is meant to be located at /coverage/ you may do:

- name: Check for existing and non-empty coverage file
  id: test_coverage_file
  run: if [ -s "/coverage/" ]; then echo "result=true" >> $GITHUB_OUTPUT ; else echo "result=false" >> $GITHUB_OUTPUT; fi
- name: Very Good Coverage
  if: steps.test_coverage_file.outputs.result == 'true'
  uses: VeryGoodOpenSource/very_good_coverage@v2
    path: '/coverage/'

Why is my input path not relative to the specified working-directory?

Relevant issue

The input path must be absolute. The specified working directory is ignored by the input path. This is because it is not possible to access the working directory from an action. In other words, Very Good Coverage always runs from the root of your repository.

For example, if your working directory is my_project and your file is at /my_project/coverage/ you must do:

        working-directory: my_project/
    runs-on: ubuntu-latest
      - uses: actions/checkout@v2
      - name: Very Good Coverage
        uses: VeryGoodOpenSource/very_good_coverage@v2
          path: /my_project/coverage/