Skip to content

Commit

Permalink
ci: merge test.yaml to build.yaml as debug job
Browse files Browse the repository at this point in the history
  • Loading branch information
threeal committed Jun 22, 2023
1 parent b2cbb69 commit e008d5b
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 71 deletions.
41 changes: 40 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,45 @@ on:
push:
branches: [main]
jobs:
debug:
runs-on: ubuntu-latest
strategy:
matrix:
package: [error]
steps:
- name: Checkout repository
uses: actions/checkout@v3.5.3

- name: Install cmake-format
run: pip3 install cmake-format

- name: Configure CMake
run: |
cmake ${{ matrix.package }} \
-B ${{ matrix.package }}/build \
-D CMAKE_CXX_FLAGS=-Werror \
-D BUILD_TESTING=ON
- name: Check code formatting
run: |
cmake --build ${{ matrix.package }}/build --target fix-format
git diff --exit-code HEAD
- name: Build project
run: cmake --build ${{ matrix.package }}/build

- name: Run unit tests
run: ctest --test-dir ${{ matrix.package }}/build --output-on-failure --no-tests=error

- name: Check code coverage
uses: threeal/gcovr-action@main
with:
root: ${{ matrix.package }}
excludes: |
${{ matrix.package }}/build/*
${{ matrix.package }}/test/*
fail-under-line: 100

release:
runs-on: ubuntu-latest
strategy:
Expand All @@ -14,7 +53,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3.5.3

- name: Configure and build this project
- name: Configure and build project
uses: threeal/cmake-action@v1.1.0
with:
source-dir: ${{ matrix.package }}
Expand Down
69 changes: 0 additions & 69 deletions .github/workflows/test.yml

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Overview

[![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)
[![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)

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

Expand Down

0 comments on commit e008d5b

Please # to comment.