ci: test action without build by modifying project instead

This commit is contained in:
Alfi Maulana 2024-03-25 13:31:56 +07:00
parent c18b3b04aa
commit d4c133a7dc
No known key found for this signature in database
GPG Key ID: 2242A64C2A8DF5A4

View File

@ -121,6 +121,9 @@ jobs:
test
sparse-checkout-cone-mode: false
- name: Modify Project
run: echo 'invalid' >> cmake-action/test/hello_world.cpp
- name: Configure Project
id: cmake-action
uses: ./cmake-action
@ -128,18 +131,6 @@ jobs:
source-dir: cmake-action/test
run-build: false
- name: Try to Test Project
id: failed-step
continue-on-error: true
uses: threeal/ctest-action@v1.0.0
with:
test-dir: ${{ steps.cmake-action.outputs.build-dir }}
tests-regex: hello_world
- name: Previous Step Should Failed
if: steps.failed-step.outcome == 'success'
run: exit 1
test-action-with-additional-args:
name: Test Action With Additional Arguments
runs-on: ${{ matrix.compiler == 'msvc' && 'windows' || 'ubuntu' }}-latest