Skip to content

Bump codecov/codecov-action from 2.1.0 to 3.1.4 #67

Bump codecov/codecov-action from 2.1.0 to 3.1.4

Bump codecov/codecov-action from 2.1.0 to 3.1.4 #67

Workflow file for this run

# GH actions
name: test-coverage
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@v3
- name: Install googletest
shell: bash
run: |
git clone https://github.com/google/googletest --depth 1
cd googletest
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/googletest-install -G Ninja
cmake --build . --config ${{env.BUILD_TYPE}} -j 2
cmake --install . --config ${{env.BUILD_TYPE}}
- name: Install lcov
run: sudo apt-get install lcov
- name: Configure with CMake
shell: bash
run: |
mkdir build
cd build
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSHUFACV_TEST=ON -DSHUFACV_COVERAGE=ON -DGTest_DIR=${{github.workspace}}/googletest-install/lib/cmake/GTest
- name: Building
run: cmake --build build --config ${{env.BUILD_TYPE}}
- name: Testing
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure
- name: lcov-collect
run: |
cd build
lcov -d . -c -o lcov.info
lcov -r lcov.info '/usr/*' -o lcov.info
lcov -r lcov.info '*/build/*' -o lcov.info
lcov --list lcov.info
- name: codecov
uses: codecov/codecov-action@v3.1.4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: build/lcov.info