codecov: adding configuration for coverage testing #235
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: Code Coverage CI | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- master | |
- coverage-dev | |
jobs: | |
standard: | |
strategy: | |
fail-fast: false | |
matrix: | |
runs-on: [ubuntu-latest] | |
name: "💦 ${{ matrix.runs-on }}" | |
runs-on: ${{ matrix.runs-on }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup gcovr (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update --fix-missing | |
sudo apt-get install -y gcovr | |
#- name: Setup gcovr (macOS) | |
# if: runner.os == 'macOS' | |
# run: brew install gcovr | |
#- name: Setup libfec | |
# run: git clone https://github.com/jgaeddert/libfec.git && cd libfec && ./configure && make && sudo make install | |
- name: bootstrap | |
run: ./bootstrap.sh | |
- name: configure | |
run: ./configure --enable-coverage | |
- name: make | |
run: make -j 2 | |
- name: make coverage | |
run: make -j 2 coverage | |
- name: upload report to codecov with github action | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: true | |
verbose: true | |
token: ${{ secrets.CODECOV_TOKEN }} |