Skip to content

Commit e008d5b

Browse files
committed
ci: merge test.yaml to build.yaml as debug job
1 parent b2cbb69 commit e008d5b

File tree

3 files changed

+40
-71
lines changed

3 files changed

+40
-71
lines changed

.github/workflows/build.yml

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,45 @@ on:
55
push:
66
branches: [main]
77
jobs:
8+
debug:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
package: [error]
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v3.5.3
16+
17+
- name: Install cmake-format
18+
run: pip3 install cmake-format
19+
20+
- name: Configure CMake
21+
run: |
22+
cmake ${{ matrix.package }} \
23+
-B ${{ matrix.package }}/build \
24+
-D CMAKE_CXX_FLAGS=-Werror \
25+
-D BUILD_TESTING=ON
26+
27+
- name: Check code formatting
28+
run: |
29+
cmake --build ${{ matrix.package }}/build --target fix-format
30+
git diff --exit-code HEAD
31+
32+
- name: Build project
33+
run: cmake --build ${{ matrix.package }}/build
34+
35+
- name: Run unit tests
36+
run: ctest --test-dir ${{ matrix.package }}/build --output-on-failure --no-tests=error
37+
38+
- name: Check code coverage
39+
uses: threeal/gcovr-action@main
40+
with:
41+
root: ${{ matrix.package }}
42+
excludes: |
43+
${{ matrix.package }}/build/*
44+
${{ matrix.package }}/test/*
45+
fail-under-line: 100
46+
847
release:
948
runs-on: ubuntu-latest
1049
strategy:
@@ -14,7 +53,7 @@ jobs:
1453
- name: Checkout repository
1554
uses: actions/checkout@v3.5.3
1655

17-
- name: Configure and build this project
56+
- name: Configure and build project
1857
uses: threeal/cmake-action@v1.1.0
1958
with:
2059
source-dir: ${{ matrix.package }}

.github/workflows/test.yml

Lines changed: 0 additions & 69 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Overview
22

33
[![build status](https://img.shields.io/github/actions/workflow/status/threeal/cpp/build.yml?branch=main)](https://github.com/threeal/cpp/actions/workflows/build.yml)
4-
[![test status](https://img.shields.io/github/actions/workflow/status/threeal/cpp/test.yml?label=test&branch=main)](https://github.com/threeal/cpp/actions/workflows/test.yml)
54

65
A comprehensive collection of [C++](https://isocpp.org/) utility packages.
76

0 commit comments

Comments
 (0)