Skip to content

reduce test log level to avoid too much debug logs (#771) #2208

reduce test log level to avoid too much debug logs (#771)

reduce test log level to avoid too much debug logs (#771) #2208

Workflow file for this run

name: Coverage
on:
push:
branches: [ "main", "0.*" ]
pull_request:
branches: [ "main", "0.*" ]
jobs:
coverage:
name: Test Coverage
runs-on: ubuntu-latest
concurrency:
group: coverage-${{ github.event.pull_request.number }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
container:
image: vsaglib/vsag:ci-x86
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- 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: Load Cache
uses: actions/cache@v4
with:
path: ./build.tar.gz
key: build-cov-${{ hashFiles('./CMakeLists.txt') }}-${{ hashFiles('./.circleci/fresh_ci_cache.commit') }}
- name: Extract
run: |
if [ -f build.tar.gz ]; then
tar -xzvf build.tar.gz;
rm -rf build.tar.gz;
else
mkdir -p build;
fi
- name: Compile with Coverage Flags
run: export CMAKE_GENERATOR="Ninja"; 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
- name: Compress
run: |
sudo apt install pigz -y;
tar -cf - ./build | pigz -p 4 > build.tar.gz