This action runs the lcov
tool with the specified options.
Note: This action only will run on Ubuntu-based runners (e.g. ubuntu-latest
or equivalent).
Required
Base directory to search for the coverage files
Required
The file to output the coverage information to.
Default: coverage.info
Files/directories to exclude from the coverage report. Wildcards are supported. This should be passed in as a string, with each exclude pattern quoted inside it.
Default: empty string (no excludes)
Display the coverage information in the action log.
Default: true
Parse coverage information for the build/
directory and save it to coverage.info
.
uses: imciner2/run-lcov@v1
with:
input_directory: build/
Remove the test
folder and the helpers.h
file.
uses: imciner2/run-lcov@v1
with:
input_directory: build/
exclude: '"test/*" "*/helpers.h"'
Parse the build/
folder inside the runner workspace for the coverage information and save the resulting coverage inside code_coverage.info
in that directory. Also remove the tests/
and examples/
folder contents from the coverage, along with system headers.
uses: imciner2/run-lcov@v1
with:
input_directory: '${{ runner.workspace }}/build'
exclude: '"$GITHUB_WORKSPACE/tests/*" "$GITHUB_WORKSPACE/examples/*" "/usr/include/x86_64-linux-gnu/*"'
output_file: '${{ runner.workspace }}/build/code_coverage.info'
Copyright (C) 2021 Ian McInerney
MIT