You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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/lcov.info you may do:
- name: Check for existing and non-empty coverage fileid: test_coverage_filerun: if [ -s "/coverage/lcov.info" ]; then echo "result=true" >> $GITHUB_OUTPUT ; else echo "result=false" >> $GITHUB_OUTPUT; fi
- name: Very Good Coverageif: steps.test_coverage_file.outputs.result == 'true'uses: VeryGoodOpenSource/very_good_coverage@v2with:
path: '/coverage/lcov.info'
Why is my input path not relative to the specified working-directory?
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/lcov.info you must do:
jobs:
build:
defaults:
run:
working-directory: my_project/runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v2
- name: Very Good Coverageuses: VeryGoodOpenSource/very_good_coverage@v2with:
path: /my_project/coverage/lcov.info
About
GitHub Action which helps enforce code coverage threshold using lcov created by Very Good Ventures 🦄