GitHub: Allow manual triggering of test workflow #18
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: CMake Tests | |
on: [push, workflow_dispatch] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure CMake | |
run: cmake -S $GITHUB_WORKSPACE -B ${{runner.workspace}}/build | |
- name: Build | |
working-directory: ${{runner.workspace}}/build | |
run: cmake --build . | |
- name: Test | |
working-directory: ${{runner.workspace}}/build | |
run: GTEST_OUTPUT=xml:test-results/ GTEST_COLOR=1 ctest -V | |
- name: Upload test results | |
uses: actions/upload-artifact@v2 | |
if: failure() | |
with: | |
name: test_results_xml | |
path: ${{runner.workspace}}/build/test-results/**/*.xml |