increase the code coverage of hnswlib #21
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: Coverage | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
coverage: | |
name: Test Coverage | |
runs-on: ubuntu-latest | |
container: | |
image: vsaglib/vsag:ubuntu | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install lcov | |
run: | | |
apt update | |
apt install -y libcapture-tiny-perl libdatetime-perl curl jq | |
git clone https://github.com/linux-test-project/lcov.git | |
cd lcov && git checkout v2.3 && make install | |
lcov --version | |
- name: Compile with Coverage Flags | |
run: make cov | |
- name: Run Test | |
run: | | |
./scripts/test_parallel_bg.sh | |
./build/mockimpl/tests_mockimpl -d yes ${UT_FILTER} --allow-running-no-tests ${UT_SHARD} | |
- name: Collect Coverage Info | |
run: | | |
bash scripts/collect_cpp_coverage.sh | |
head -n10 coverage/coverage.info | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
fail_ci_if_error: true | |
files: coverage/coverage.info | |
disable_search: true | |
flags: cpp | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verbose: true |