Non-functional code change to re-trigger CI #19
This file contains hidden or 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, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| workflow_dispatch: | |
| jobs: | |
| coverage: | |
| name: Code Coverage | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ninja-build gcc-11 g++-11 lcov | |
| - name: Setup CMake | |
| uses: jwlawson/[email protected] | |
| with: | |
| cmake-version: '3.25' | |
| - name: Configure CMake with Coverage | |
| run: | | |
| cmake -B build \ | |
| -DCMAKE_BUILD_TYPE=Debug \ | |
| -DCMAKE_CXX_FLAGS="--coverage -fprofile-arcs -ftest-coverage" \ | |
| -DCMAKE_C_FLAGS="--coverage -fprofile-arcs -ftest-coverage" \ | |
| -DCMAKE_EXE_LINKER_FLAGS="--coverage" \ | |
| -G Ninja | |
| env: | |
| CC: gcc-11 | |
| CXX: g++-11 | |
| - name: Build | |
| run: cmake --build build --parallel | |
| - name: Run Tests | |
| working-directory: build | |
| run: ./SlotMapTest --gtest_filter=-SlotMapTest.*_Slow | |
| - name: Generate Coverage Report | |
| run: | | |
| lcov --directory build --capture --output-file coverage.info | |
| lcov --extract coverage.info '*/slot_map/slot_map.h' --output-file coverage_filtered.info | |
| lcov --list coverage_filtered.info | |
| echo "=== Coverage file contents ===" | |
| cat coverage_filtered.info | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage_filtered.info | |
| slug: SergeyMakeev/SlotMap | |
| fail_ci_if_error: true | |
| verbose: true |