@@ -32,24 +32,23 @@ jobs:
3232      - name : Configure using cmake 
3333        run : | 
3434          cmake -S ./ -B ./build \ 
35-           -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ 
3635          -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX% \ 
3736          -DCMAKE_PREFIX_PATH=%CONDA_PREFIX% \ 
3837          -DSPARROW_IPC_BUILD_SHARED=${{ matrix.build_shared }} \ 
3938          -DSPARROW_IPC_BUILD_TESTS=ON 
4039
4140       - name : Build sparrow-ipc 
4241        working-directory : build 
43-         run : cmake --build . --target sparrow-ipc 
42+         run : cmake --build . --config ${{ matrix.build_type }} -- target sparrow-ipc 
4443
4544      - name : Build tests 
4645        working-directory : build 
47-         run : cmake --build . --target test_sparrow_ipc_lib 
46+         run : cmake --build . --config ${{ matrix.build_type }} -- target test_sparrow_ipc_lib 
4847
4948      - name : Run tests 
5049        working-directory : build 
5150        run : | 
52-           cmake --build . --target run_tests  
51+           cmake --build . --config ${{ matrix.build_type }} -- target run_tests_with_junit_report  
5352
5453   windows_build_fetch_from_source :
5554    runs-on : windows-latest 
@@ -61,22 +60,45 @@ jobs:
6160      - name : Checkout repository 
6261        uses : actions/checkout@v4 
6362
63+       - name : Enable tests coverage 
64+         if : matrix.build_type == 'Debug' 
65+         run : | 
66+           choco install opencppcoverage 
67+           echo "TEST_COVERAGE_ACTIVATION=-DSPARROW_IPC_ENABLE_COVERAGE=ON" >> $GITHUB_ENV 
68+ 
6469       - name : Configure using cmake 
6570        run : | 
6671          cmake -S ./ -B ./build \ 
67-           -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ 
6872          -DSPARROW_IPC_BUILD_SHARED=${{ matrix.build_shared }} \ 
6973          -DSPARROW_IPC_BUILD_TESTS=ON \ 
70-           -DFETCH_DEPENDENCIES_WITH_CMAKE=MISSING 
74+           -DFETCH_DEPENDENCIES_WITH_CMAKE=MISSING \ 
75+           $TEST_COVERAGE_ACTIVATION 
7176
7277       - name : Build sparrow-ipc 
7378        working-directory : build 
74-         run : cmake --build . --target sparrow-ipc 
79+         run : cmake --build . --config ${{ matrix.build_type }} -- target sparrow-ipc 
7580
7681      - name : Build tests 
7782        working-directory : build 
78-         run : cmake --build . --target test_sparrow_ipc_lib 
83+         run : cmake --build . --config ${{ matrix.build_type }} -- target test_sparrow_ipc_lib 
7984
8085      - name : Run tests 
8186        working-directory : build 
82-         run : cmake --build . --target run_tests_with_junit_report 
87+         run : cmake --build . --config ${{ matrix.build_type }} --target run_tests_with_junit_report 
88+ 
89+       - name : Tests coverage 
90+         if : matrix.build_type == 'Debug' 
91+         working-directory : build 
92+         run : | 
93+           cmake --build . --config Debug --target sparrow_ipc_generate_cobertura 
94+ 
95+        - name : Upload coverage to Codecov 
96+         if : matrix.build_type == 'Debug' 
97+         uses : codecov/codecov-action@v5 
98+         with :
99+           directory : ./build/coverage_reports/ 
100+           fail_ci_if_error : true 
101+           files : ./cobertura.xml 
102+           flags : unittests 
103+           token : ${{ secrets.CODECOV_TOKEN }} 
104+           verbose : true 
0 commit comments