Divide Workflow into Build and Test Workflows #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
check-project: | |
name: Check Project | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Configure project | |
uses: threeal/[email protected] | |
with: | |
options: BUILD_TESTING=ON | |
- name: Check formatting | |
run: | | |
cmake --build build --target format | |
git diff --exit-code HEAD | |
test-project: | |
name: Test Project | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Configure project | |
uses: threeal/[email protected] | |
with: | |
options: BUILD_TESTING=ON | |
- name: Build Project | |
run: cmake --build build | |
- name: Test Project | |
run: ctest --test-dir build --output-on-failure --no-tests=error | |
- name: Check coverage | |
uses: threeal/[email protected] | |
with: | |
excludes: build/* | |
fail-under-line: 100 |