From d4c92278301c0ff631b1bb7b7dbc0f0af811f901 Mon Sep 17 00:00:00 2001 From: ado Date: Tue, 8 Aug 2023 01:06:27 +0200 Subject: [PATCH] Update coverage ci --- .github/workflows/coverage.yml | 9 +++++++-- test/CMakeLists.txt | 2 +- test/test_helpers.hpp | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index df70a9a..f752f8e 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,4 +1,4 @@ -name: ubuntu-latest-gcc-ci +name: coverage-ci on: workflow_dispatch: @@ -18,7 +18,7 @@ on: - bugfix/** jobs: - gcc_tests: + test_coverage: if: >- ! contains(toJSON(github.event.commits.*.message), '[skip ci]') && ! contains(toJSON(github.event.commits.*.message), '[skip github]') @@ -43,6 +43,11 @@ jobs: - name: Install dependencies run: script/ci_install_deps.sh + - name: Install test coverage tools + run: | + apt update + apt install -y gcovr lcov + - name: Configure run: cmake -S test -B build -D CMAKE_BUILD_TYPE=Debug diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 94c3327..e757397 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -41,6 +41,6 @@ foreach(name IN ITEMS test_splitter test_parser test_converter test_extractions target_link_libraries("${name}" PRIVATE ssp::ssp fast_float doctest::doctest) target_compile_definitions( - "${name}" PRIVATE DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN CMAKE_GITHUB_CI) + "${name}" PRIVATE DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN _CMAKE_GITHUB_CI) add_test(NAME "${name}" COMMAND "${name}") endforeach() diff --git a/test/test_helpers.hpp b/test/test_helpers.hpp index b7f362f..0437935 100644 --- a/test/test_helpers.hpp +++ b/test/test_helpers.hpp @@ -6,7 +6,7 @@ #include #include -#ifdef CMAKE_GITHUB_CI +#ifdef _CMAKE_GITHUB_CI #include #else #include