Rename GitHub Action Metadata File #37
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: | |
test-action: | |
name: Test Action | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows, ubuntu, macos] | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v4.1.2 | |
with: | |
repository: threeal/cpp-starter | |
- name: Checkout Action | |
uses: actions/checkout@v4.1.2 | |
with: | |
path: ctest-action | |
sparse-checkout: | | |
test | |
action.yml | |
sparse-checkout-cone-mode: false | |
- name: Configure and Build Project | |
uses: threeal/cmake-action@v1.3.0 | |
with: | |
generator: Ninja | |
options: BUILD_TESTING=ON | |
run-build: true | |
- name: Test Project | |
uses: ./ctest-action | |
test-action-with-test-dir: | |
name: Test Action With Test Directory Specified | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v4.1.2 | |
with: | |
repository: threeal/cpp-starter | |
- name: Checkout Action | |
uses: actions/checkout@v4.1.2 | |
with: | |
path: ctest-action | |
sparse-checkout: | | |
test | |
action.yml | |
sparse-checkout-cone-mode: false | |
- name: Configure and Build Project | |
uses: threeal/cmake-action@v1.3.0 | |
with: | |
build-dir: output | |
options: BUILD_TESTING=ON | |
run-build: true | |
- name: Test Project | |
uses: ./ctest-action | |
with: | |
test-dir: output | |
test-action-with-build-config: | |
name: Test Action With Build Config Specified | |
runs-on: windows-latest | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v4.1.2 | |
with: | |
repository: threeal/cpp-starter | |
- name: Checkout Action | |
uses: actions/checkout@v4.1.2 | |
with: | |
path: ctest-action | |
sparse-checkout: | | |
test | |
action.yml | |
sparse-checkout-cone-mode: false | |
- name: Configure and Build Project | |
uses: threeal/cmake-action@v1.3.0 | |
with: | |
options: BUILD_TESTING=ON | |
run-build: true | |
- name: Test Project | |
uses: ./ctest-action | |
with: | |
build-config: Debug | |
test-action-with-test-regex: | |
name: Test Action With Test Regex Specified | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v4.1.2 | |
with: | |
repository: threeal/cpp-starter | |
- name: Modify Project | |
run: echo 'TEST_CASE("failing test") { CHECK(false); }' >> test/sequence_test.cpp | |
- name: Checkout Action | |
uses: actions/checkout@v4.1.2 | |
with: | |
path: ctest-action | |
sparse-checkout: | | |
test | |
action.yml | |
sparse-checkout-cone-mode: false | |
- name: Configure and Build Project | |
uses: threeal/cmake-action@v1.3.0 | |
with: | |
options: BUILD_TESTING=ON | |
run-build: true | |
- name: Test Project | |
uses: ./ctest-action | |
with: | |
tests-regex: test fibonacci sequence |