chore: add codecov github action #63
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Debug Test | |
steps: | |
- name: Set up GCC | |
uses: egor-tensin/setup-gcc@v1 | |
with: | |
version: 12 | |
platform: x64 | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: sudo apt install -y libaio-dev | |
- name: Config project | |
run: cmake -B build/debug -S . -DCMAKE_BUILD_TYPE=Debug -DBUILD_WITH_COVERAGE=ON | |
- name: Build project | |
run: cmake --build build/debug -j `nproc` | |
- name: Test and generate coverage | |
run: cmake --build build/debug --target ctest_coverage | |
- name: Setup tmate session | |
if: ${{ failure() }} | |
uses: mxschmitt/action-tmate@v3 | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
files: build/debug/ctest_coverage.xml | |
verbose: true |