From 2e16a1b0a6a07b505333c64047a5442ec7c57588 Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Mon, 25 Mar 2024 14:35:53 +0700 Subject: [PATCH] ci: test if project built by running it instead --- .github/workflows/test.yaml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e44dc9e..23d8cf0 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -73,14 +73,11 @@ jobs: sparse-checkout-cone-mode: false - name: Configure and Build Project + id: cmake-action uses: ./cmake-action - with: - options: BUILD_TESTING=ON - - name: Test Project - uses: threeal/ctest-action@v1.0.0 - with: - build-config: Debug + - name: Run Project + run: ${{ steps.cmake-action.outputs.build-dir }}/${{ matrix.os == 'windows' && 'Debug/generate_sequence.exe' || 'generate_sequence' }} 5 test-action-with-specified-dirs: name: Test Action With Specified Directories @@ -102,16 +99,14 @@ jobs: sparse-checkout-cone-mode: false - name: Configure and Build Project + id: cmake-action uses: ./cmake-action with: source-dir: project build-dir: output - options: BUILD_TESTING=ON - - name: Test Project - uses: threeal/ctest-action@v1.0.0 - with: - test-dir: output + - name: Run Project + run: output/generate_sequence 5 test-action-without-run-build: name: Test Action Without Run Build