From 4ae4e2cd58eb7c86ae479656ee9ad09f2e7214b2 Mon Sep 17 00:00:00 2001 From: Vijai Kumar S Date: Sun, 2 Jun 2024 01:16:36 +0530 Subject: [PATCH] Have a dedicated job to set integration tests status --- .github/workflows/build.yml | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 27b8e7baa..e1435278c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -300,10 +300,25 @@ jobs: cmake --build . ./Example_ExtractInfo ../../Files/Helix.3mf - integration-tests-latest-release: + set-integration-tests-status: runs-on: ubuntu-20.04 needs: [deploy-linux, deploy-windows, deploy-macos] - if: ${{ env.RUN_INTEGRATION_TESTS == 'on' }} # Single check before the job starts + outputs: + run_integration_tests: ${{ steps.set-status.outputs.run_integration_tests }} + steps: + - name: Set status + id: set-status + run: | + if [ "${{ env.RUN_INTEGRATION_TESTS }}" == "on" ]; then + echo "::set-output name=run_integration_tests::true" + else + echo "::set-output name=run_integration_tests::false" + fi + + integration-tests-latest-release: + runs-on: ubuntu-20.04 + needs: [set-integration-tests-status] + if: needs.set-integration-tests-status.outputs.run_integration_tests == 'true' # Single check before the job starts steps: - name: Checkout code uses: actions/checkout@v2 @@ -366,8 +381,8 @@ jobs: integration-tests-last-two-releases: runs-on: ubuntu-20.04 - needs: [deploy-linux, deploy-windows, deploy-macos] - if: ${{ env.RUN_INTEGRATION_TESTS == 'on' }} # Single check before the job starts + needs: [set-integration-tests-status] + if: needs.set-integration-tests-status.outputs.run_integration_tests == 'true' # Single check before the job starts steps: - name: Checkout code uses: actions/checkout@v2 @@ -468,8 +483,8 @@ jobs: integration-tests-latest-commit: runs-on: ubuntu-20.04 - needs: [deploy-linux, deploy-windows, deploy-macos] - if: ${{ env.RUN_INTEGRATION_TESTS == 'on' }} # Single check before the job starts + needs: [set-integration-tests-status] + if: needs.set-integration-tests-status.outputs.run_integration_tests == 'true' # Single check before the job starts steps: - name: Checkout code uses: actions/checkout@v2 @@ -523,8 +538,8 @@ jobs: integration-test-last-commit-and-last-release: runs-on: ubuntu-20.04 - needs: [deploy-linux, deploy-windows, deploy-macos] - if: ${{ env.RUN_INTEGRATION_TESTS == 'on' }} # Single check before the job starts + needs: [set-integration-tests-status] + if: needs.set-integration-tests-status.outputs.run_integration_tests == 'true' # Single check before the job starts steps: - name: Checkout code uses: actions/checkout@v2