Skip to content

Commit b12af2b

Browse files
committed
Add Github action for Code-coverage
1 parent 5aad5f2 commit b12af2b

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

.github/workflows/code-coverage.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,19 @@ env:
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12-
permissions:
13-
contents: write
1412

1513
steps:
1614
- uses: actions/checkout@v4
17-
- name: Setup cmake
18-
uses: jwlawson/actions-setup-cmake@v2
19-
with:
20-
cmake-version: '3.22.x'
21-
- name: Configure CMake
22-
run: cmake -B cmake-build-posix -S executables/referenceApp -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
23-
24-
- name: Build
25-
run: cmake --build cmake-build-posix --target app.referenceApp -j --config ${{env.BUILD_TYPE}}
26-
27-
- name: Test
28-
# Execute tests defined by the CMake configuration.
29-
run: |
30-
cmake -B cmake-build-unit-tests -S executables/unitTest -DBUILD_UNIT_TESTS=ON
31-
cmake --build cmake-build-unit-tests -j4
32-
ctest --test-dir cmake-build-unit-tests -j4
3315

3416
#Code coverage
3517
- name: Install lcov
3618
run: sudo apt install lcov
3719

3820
- name: Capture code coverage
3921
run: lcov --capture --directory . \
40-
--output-file cmake-build-unit-tests/coverage_unfiltered.info
22+
23+
- name: Capture code coverage 2
24+
run: --output-file cmake-build-unit-tests/coverage_unfiltered.info
4125

4226
- name: Filter out 3rd party and mock files
4327
run: |

0 commit comments

Comments
 (0)