Skip to content

Commit ce7e24f

Browse files
committed
Add test coverage action
1 parent 26f0e5a commit ce7e24f

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

.github/workflows/coverage.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: coverage
2+
3+
on: # rebuild any PRs and main branch changes
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
coverage:
11+
uses: ./.github/workflows/devcontainer-command.yml
12+
with:
13+
run_cmd: |
14+
cmake -E make_directory ${{github.workspace}}/build
15+
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Debug -DTRAITS_TEST_COVERAGE=On -S ${{github.workspace}}
16+
cmake --build ${{github.workspace}}/build --config Debug --target all
17+
cmake --build ${{github.workspace}}/build --config Debug --target test
18+
cmake --build ${{github.workspace}}/build --config Debug --target coverage

.github/workflows/examples.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ jobs:
3535
3636
- name: Configure CMake
3737
run: >
38-
cmake -B ${{ steps.strings.outputs.build-output-dir }}
38+
cmake
39+
-B ${{ steps.strings.outputs.build-output-dir }}
3940
-DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }}
4041
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
4142
-S ${{ github.workspace }}/examples

.github/workflows/tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ jobs:
3535
3636
- name: Configure CMake
3737
run: >
38-
cmake -B ${{ steps.strings.outputs.build-output-dir }}
38+
cmake
39+
-B ${{ steps.strings.outputs.build-output-dir }}
3940
-DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }}
4041
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
4142
-S ${{ github.workspace }}

0 commit comments

Comments
 (0)