add code coverage support #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code Coverage | |
on: | |
pull_request: | |
jobs: | |
coverage_report: | |
name: Generate coverage report | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Setup vcpkg | |
run: | | |
python ./tools/install-vcpkg.py | |
- name: Setup lcov | |
uses: hrishikesh-kadam/setup-lcov@v1 | |
- name: Generate lcov input | |
run: | | |
chmod +x ./build.sh | |
chmod +x ./coverage.sh | |
./coverage.sh | |
- name: Report code coverage | |
uses: zgosalvez/github-actions-report-lcov@v3 | |
with: | |
coverage-files: build/filtered_coverage.info | |
minimum-coverage: 90 | |
artifact-name: code-coverage-report | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
#working-directory: build/coverage_report | |
update-comment: true |