From 3d41bdccc60d24133462f055551279dbeb68d872 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Thu, 5 Dec 2024 21:59:44 -0700 Subject: [PATCH] Fix condition check --- .github/workflows/test-action.yml | 7 ++++--- .github/workflows/test-packages-action.yml | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index e01a6549ee7..53ab6ba8c68 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -67,7 +67,7 @@ jobs: test-linux: name: ${{ matrix.display_name }} ${{ matrix.tests-chunk }} ${{ matrix.transport }} ${{ matrix.fips && '--fips ' || '' }} - if: ${{ fromJSON(inputs.matrix)['linux'] != '[ ]' }} + if: ${{ toJSON(fromJSON(inputs.matrix)['linux']) != '[]' }} runs-on: - ${{ matrix.arch == 'x86_64' && 'ubuntu-22.04' || 'linux-arm64' }} container: @@ -317,7 +317,7 @@ jobs: runs-on: ${{ matrix.runner }} # Full test runs. Each chunk should never take more than 2 hours. # Partial test runs(no chunk parallelization), 6 Hours - if: ${{ fromJSON(inputs.matrix)['macos'] != '[ ]' }} + if: ${{ toJSON(fromJSON(inputs.matrix)['macos']) != '[]' }} timeout-minutes: ${{ fromJSON(inputs.testrun)['type'] == 'full' && inputs.default-timeout || 360 }} strategy: fail-fast: false @@ -548,7 +548,7 @@ jobs: test-windows: name: ${{ matrix.display_name }} ${{ matrix.tests-chunk }} ${{ matrix.transport }} - if: ${{ fromJSON(inputs.matrix)['windows'] != '[ ]' }} + if: ${{ toJSON(fromJSON(inputs.matrix)['windows']) != '[]' }} runs-on: ${{ matrix.slug }} # Full test runs. Each chunk should never take more than 2 hours. # Partial test runs(no chunk parallelization), 6 Hours @@ -786,6 +786,7 @@ jobs: report: name: Test Reports runs-on: ubuntu-22.04 + if: ${{ toJSON(fromJSON(inputs.matrix)['linux']) != '[]' }} needs: - test-linux - test-macos diff --git a/.github/workflows/test-packages-action.yml b/.github/workflows/test-packages-action.yml index fe26adebf17..5918fb2aa60 100644 --- a/.github/workflows/test-packages-action.yml +++ b/.github/workflows/test-packages-action.yml @@ -65,7 +65,7 @@ jobs: # container: # image: ${{ matrix.container }} # options: --privileged - if: ${{ fromJSON(inputs.matrix)['linux'] != '[ ]' }} + if: ${{ toJSON(fromJSON(inputs.matrix)['linux']) != '[]' }} timeout-minutes: 120 # 2 Hours - More than this and something is wrong strategy: fail-fast: false @@ -193,7 +193,7 @@ jobs: test-macos: name: ${{ matrix.display_name }} ${{ matrix.tests-chunk }} runs-on: ${{ matrix.runner }} - if: ${{ fromJSON(inputs.matrix)['macos'] != '[ ]' }} + if: ${{ toJSON(fromJSON(inputs.matrix)['macos']) != '[]' }} timeout-minutes: 150 # 2 & 1/2 Hours - More than this and something is wrong (MacOS needs a little more time) strategy: fail-fast: false @@ -312,7 +312,7 @@ jobs: name: ${{ matrix.display_name }} ${{ matrix.tests-chunk }} runs-on: ${{ matrix.distro-slug }} timeout-minutes: 120 # 2 Hours - More than this and something is wrong - if: ${{ fromJSON(inputs.matrix)['windows'] != '[ ]' }} + if: ${{ toJSON(fromJSON(inputs.matrix)['windows']) != '[]' }} strategy: fail-fast: false matrix: @@ -454,7 +454,7 @@ jobs: report: name: Report runs-on: ubuntu-22.04 - if: always() + if: ${{ toJSON(fromJSON(inputs.matrix)['linux']) != '[]' }} needs: - test-linux - test-macos