Skip to content

Commit

Permalink
fix: fix empty input (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin authored Jan 28, 2024
1 parent a5ce2e4 commit f34d08a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
28 changes: 22 additions & 6 deletions .github/workflows/laravel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:
default: '[]'
testsuites:
type: string
default: '[]'
default: ''
database_seed:
type: boolean
default: false
Expand All @@ -44,9 +44,29 @@ on:
required: true

jobs:
init:
name: Initialize
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- name: Setup matrix
id: matrix
run: |
{
echo -n "matrix={"
echo -n "\"php-version\": ${{ inputs.php-versions }},"
echo -n "\"connection\": ${{ inputs.connections }},"
if [ -n "${{ inputs.testsuites }}" ]; then
echo -n "\"testsuites\": ${{ inputs.testsuites }},"
fi
echo "\"exclude\": ${{ inputs.matrix-exclude }}}"
} | tee $GITHUB_OUTPUT
tests:
name: Unit tests
uses: ./.github/workflows/test_website.yml
needs: init
with:
php-version: ${{ matrix.php-version }}
connection: ${{ matrix.connection }}
Expand All @@ -59,11 +79,7 @@ jobs:

strategy:
fail-fast: false
matrix:
php-version: ${{ fromJson(inputs.php-versions) }}
connection: ${{ fromJson(inputs.connections) }}
exclude: ${{ fromJson(inputs.matrix-exclude) }}
testsuites: ${{ fromJson(inputs.testsuites) }}
matrix: ${{ fromJson(needs.init.outputs.matrix) }}

reporting:
name: Reportings
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reporting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
secrets:
SONAR_TOKEN:
required: true

jobs:
###########################
# Reporting to sonarcloud
Expand Down

0 comments on commit f34d08a

Please sign in to comment.