Skip to content

Commit

Permalink
Merge pull request #89 from wp-cli/fix-empty-matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy authored Nov 4, 2023
2 parents 55610bd + d0752bb commit 1871f05
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/reusable-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ jobs:
if [[ $FILE_EXISTS == 'true' ]]; then
echo "matrix=$(jq -c '.include |= map(with_entries(select(.key == "php"))) | .include |= map(select(.php >= "${{ inputs.minimum-php }}"))' <<< $BASE_MATRIX)" >> $GITHUB_OUTPUT
else
echo "matrix={}" >> $GITHUB_OUTPUT
echo "matrix=" >> $GITHUB_OUTPUT
fi
env:
BASE_MATRIX: ${{ needs.get-matrix.outputs.matrix }}
Expand All @@ -215,6 +215,7 @@ jobs:
unit: #-----------------------------------------------------------------------
name: Unit test / PHP ${{ matrix.php }}
needs: prepare-unit
if: ${{ needs.prepare-unit.outputs.matrix != '' }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.prepare-unit.outputs.matrix) }}
Expand Down Expand Up @@ -283,7 +284,7 @@ jobs:
if [[ $FILE_EXISTS == 'true' ]]; then
echo "matrix=$(jq -c '.include |= map(select(.php >= "${{ inputs.minimum-php }}"))' <<< $BASE_MATRIX)" >> $GITHUB_OUTPUT
else
echo "matrix={}" >> $GITHUB_OUTPUT
echo "matrix=" >> $GITHUB_OUTPUT
fi
env:
BASE_MATRIX: ${{ needs.get-matrix.outputs.matrix }}
Expand All @@ -292,6 +293,7 @@ jobs:
functional: #-----------------------------------------------------------------
name: Functional - WP ${{ matrix.wp }} on PHP ${{ matrix.php }} with ${{ matrix.dbtype != 'sqlite' && format('MySQL {0}', matrix.mysql) || 'SQLite' }}
needs: prepare-functional
if: ${{ needs.prepare-functional.outputs.matrix != '' }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.prepare-functional.outputs.matrix) }}
Expand Down

0 comments on commit 1871f05

Please sign in to comment.