Skip to content

Commit 2872aff

Browse files
committed
Run coverage in windows from source
1 parent dae2c7b commit 2872aff

File tree

1 file changed

+25
-27
lines changed

1 file changed

+25
-27
lines changed

.github/workflows/windows.yml

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,8 @@ jobs:
2929
init-shell: bash
3030
cache-environment: true
3131

32-
- name: Enable tests coverage
33-
if: matrix.build_type == 'Debug'
34-
run: |
35-
choco install opencppcoverage
36-
echo "TEST_COVERAGE_ACTIVATION=' -DENABLE_COVERAGE=ON'" >> $GITHUB_ENV
37-
3832
- name: Configure using cmake
3933
run: |
40-
#if [[ "${{ matrix.build_type }}" == "Debug" ]]; then
41-
#export CMAKE_ARGS="-DENABLE_COVERAGE=ON"
42-
#fi
4334
cmake -S ./ -B ./build \
4435
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
4536
-DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX% \
@@ -61,23 +52,6 @@ jobs:
6152
run: |
6253
cmake --build . --target run_tests
6354
64-
- name: Tests coverage
65-
if: matrix.build_type == 'Debug'
66-
working-directory: build
67-
run: |
68-
cmake --build . --config Debug --target generate_cobertura
69-
70-
- name: Upload coverage to Codecov
71-
if: matrix.build_type == 'Debug'
72-
uses: codecov/codecov-action@v5
73-
with:
74-
directory: ./build/coverage_reports/
75-
fail_ci_if_error: true
76-
files: ./cobertura.xml
77-
flags: unittests
78-
token: ${{ secrets.CODECOV_TOKEN }}
79-
verbose: true
80-
8155
windows_build_fetch_from_source:
8256
runs-on: windows-latest
8357
strategy:
@@ -88,13 +62,20 @@ jobs:
8862
- name: Checkout repository
8963
uses: actions/checkout@v4
9064

65+
- name: Enable tests coverage
66+
if: matrix.build_type == 'Debug'
67+
run: |
68+
choco install opencppcoverage
69+
echo "TEST_COVERAGE_ACTIVATION=' -DENABLE_COVERAGE=ON'" >> $GITHUB_ENV
70+
9171
- name: Configure using cmake
9272
run: |
9373
cmake -S ./ -B ./build \
9474
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
9575
-DSPARROW_IPC_BUILD_SHARED=${{ matrix.build_shared }} \
9676
-DSPARROW_IPC_BUILD_TESTS=ON \
97-
-DFETCH_DEPENDENCIES_WITH_CMAKE=MISSING
77+
-DFETCH_DEPENDENCIES_WITH_CMAKE=MISSING \
78+
$TEST_COVERAGE_ACTIVATION
9879
9980
- name: Build sparrow-ipc
10081
working-directory: build
@@ -107,3 +88,20 @@ jobs:
10788
- name: Run tests
10889
working-directory: build
10990
run: cmake --build . --target run_tests_with_junit_report
91+
92+
- name: Tests coverage
93+
if: matrix.build_type == 'Debug'
94+
working-directory: build
95+
run: |
96+
cmake --build . --config Debug --target generate_cobertura
97+
98+
- name: Upload coverage to Codecov
99+
if: matrix.build_type == 'Debug'
100+
uses: codecov/codecov-action@v5
101+
with:
102+
directory: ./build/coverage_reports/
103+
fail_ci_if_error: true
104+
files: ./cobertura.xml
105+
flags: unittests
106+
token: ${{ secrets.CODECOV_TOKEN }}
107+
verbose: true

0 commit comments

Comments
 (0)