Skip to content

setup codecov for C++ and Fortran files in PyPartMC src folder #11

setup codecov for C++ and Fortran files in PyPartMC src folder

setup codecov for C++ and Fortran files in PyPartMC src folder #11

Workflow file for this run

name: codecov
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
codecov:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
with:
submodules: recursive
fetch-depth: 0
- run: sudo apt install -y lcov
- run: |
set -xe
CMAKE_ARGS="-DCMAKE_CXX_FLAGS=--coverage -DCMAKE_C_FLAGS=--coverage -DCMAKE_Fortran_FLAGS=--coverage" pip install -e .[tests]
pytest -We tests
lcov --capture --directory ./build/*/_PyPartMC/CMakeFiles/_PyPartMC.dir/ --output-file coverage.info --no-external
# - uses: mxschmitt/action-tmate@v3
# with:
# limit-access-to-actor: true
- uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
disable_search: true
fail_ci_if_error: true
files: coverage.info