Skip to content

Commit 64a620a

Browse files
authored
ci: Adapt code coverage workflow (#3890)
Signed-off-by: Julien Jerphanion <[email protected]>
1 parent 5cef483 commit 64a620a

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

.github/workflows/coverage.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ jobs:
5858
-D BUILD_MICROMAMBA=ON \
5959
-D ENABLE_MAMBA_ROOT_PREFIX_FALLBACK=OFF \
6060
-D CMAKE_BUILD_TYPE=Debug \
61-
-D CMAKE_CXX_FLAGS_DEBUG="-g -O0 -fno-omit-frame-pointer --coverage" \
62-
-D CMAKE_C_FLAGS_DEBUG="-g -O0 -fno-omit-frame-pointer --coverage"
61+
-D CMAKE_CXX_FLAGS_DEBUG="-g -O0 -fno-omit-frame-pointer --coverage -fprofile-update=atomic" \
62+
-D CMAKE_C_FLAGS_DEBUG="-g -O0 -fno-omit-frame-pointer --coverage -fprofile-update=atomic"
6363
cmake --build build/ --parallel
6464
- name: Show build cache statistics
6565
run: sccache --show-stats
@@ -77,19 +77,22 @@ jobs:
7777
run: |
7878
lcov --directory . --capture --output-file cpp_coverage.info
7979
lcov --remove cpp_coverage.info '/usr/*' '*/tests/*' '*/build/*' --output-file cpp_coverage.info --ignore-errors unused
80-
lcov --summary cpp_coverage.info --ignore-errors mismatch
81-
- name: Install libmambapy
82-
run: |
83-
cmake --install build/ --prefix "${CONDA_PREFIX}"
84-
python -m pip install --no-deps --no-build-isolation ./libmambapy
85-
- name: Run Python tests with coverage
86-
continue-on-error: true
87-
run: |
88-
# Run libmambapy tests with coverage
89-
python -m pytest libmambapy/tests/ --cov=libmambapy --cov-report=xml --cov-report=term-missing
90-
# Run micromamba tests with coverage
91-
export TEST_MAMBA_EXE=$(pwd)/build/micromamba/mamba
92-
python -m pytest micromamba/tests/ --cov=micromamba --cov-report=xml --cov-report=term-missing
80+
lcov --summary cpp_coverage.info --ignore-errors mismatch --rc geninfo_unexecuted_blocks=1
81+
82+
# TODO: Those steps need adaptations so that the coverage reports from the C++ and the python test suites are consolidated.
83+
# - name: Install libmambapy
84+
# run: |
85+
# cmake --install build/ --prefix "${CONDA_PREFIX}"
86+
# python -m pip install --no-deps --no-build-isolation ./libmambapy
87+
# - name: Run Python tests with coverage
88+
# continue-on-error: true
89+
# run: |
90+
# # Run libmambapy tests with coverage
91+
# python -m pytest libmambapy/tests/ --cov=libmambapy --cov-report=xml --cov-report=term-missing
92+
# # Run micromamba tests with coverage
93+
# export TEST_MAMBA_EXE=$(pwd)/build/micromamba/mamba
94+
# python -m pytest micromamba/tests/ --cov=micromamba --cov-report=xml --cov-report=term-missing
95+
9396
- name: Upload coverage to Codecov
9497
uses: codecov/codecov-action@v4
9598
with:

0 commit comments

Comments
 (0)