Skip to content

Commit 609efcc

Browse files
committed
update coverage action
1 parent 3b9faa6 commit 609efcc

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/coverage.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,27 @@ jobs:
1212
# ... Generate LCOV files or download it from a different job
1313
- name: Setup LCOV
1414
uses: hrishikesh-kadam/setup-lcov@v1
15+
- name: Install gtest
16+
run: sudo apt-get install libgtest-dev && cd /usr/src/gtest && sudo cmake CMakeLists.txt && sudo make && sudo cp lib/*.a /usr/lib && sudo ln -s /usr/lib/libgtest.a /usr/local/lib/libgtest.a && sudo ln -s /usr/lib/libgtest_main.a /usr/local/lib/libgtest_main.a
17+
18+
- name: Write files
19+
env:
20+
FILE_ONE: ${{ secrets.KRM_MAIN_FILE }}
21+
FILE_TWO: ${{ secrets.KRM_SCND_FILE }}
22+
run: |
23+
echo "${FILE_ONE}" | base64 --decode > ${HOME}/key.pem |
24+
echo "${FILE_TWO}" | base64 --decode > ${HOME}/scert.crt
25+
26+
- name: Build and test
27+
run: |
28+
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release
29+
cmake --build ${{github.workspace}}/build --config Release
30+
ctest -VV --test-dir ${{github.workspace}}/build -C Release
31+
32+
- name: Run lcov
33+
run: |
34+
lcov -c -d . -o lcov.info
35+
1536
- name: Report code coverage
1637
uses: zgosalvez/github-actions-report-lcov@v3
1738
with:

0 commit comments

Comments
 (0)