Skip to content

Commit

Permalink
fix coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
pit-ray committed Feb 12, 2024
1 parent 96be03f commit cc0d79e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:

env:
BUILD_TYPE: Debug
TOKEN: ${{secrets.COVERITY_TOKEN}}

jobs:
Windows:
Expand All @@ -44,8 +45,8 @@ jobs:
with:
arch: x64

- name: Coveralls GitHub Action
uses: coverallsapp/[email protected]
- name: Install cpp-coveralls
run: pip install --user cpp-coveralls

- name: Configure CMake
run: cmake -B build_test tests
Expand All @@ -55,3 +56,11 @@ jobs:

- name: Test
run: ctest -C ${{env.BUILD_TYPE}} --test-dir build_test --output-on-failure

- name: Collect gcov files
run: |
cmake -B build_test tests -DCOVERAGE=1
tar xvf build_test/gcov.tar.gz
- name: Submit the gcov into the Coveralls
run: coveralls -i Testing/CoverageInfo/fluent_tray.hpp.gcov -t ${{env.TOKEN}}
13 changes: 12 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0.0)
cmake_minimum_required(VERSION 3.5.0)
project(fluent-tray-test VERSION 0.0.1)

enable_testing()
Expand Down Expand Up @@ -96,3 +96,14 @@ set(
CMAKE_CTEST_ARGUMENTS
"${CMAKE_CTEST_ARGUMENTS} --verbose --no-label-summary --parallel ${PROC_N}"
)

if(${COVERAGE})
include(CTestCoverageCollectGCOV)
ctest_coverage_collect_gcov(
TARBALL gcov.tar.gz
TARBALL_COMPRESSION GZIP
SOURCE ${PROJECT_SOURCE_DIR}
BUILD ${CMAKE_BINARY_DIR}
GCOV_COMMAND gcov
GCOV_OPTIONS -bc)
endif()

0 comments on commit cc0d79e

Please sign in to comment.