Skip to content

Commit

Permalink
correct the matrix format and add comma for the json arraylist
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Liang <[email protected]>
  • Loading branch information
RyanL1997 committed Dec 8, 2023
1 parent 0772dbf commit 9625bd3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/integration-tests-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ jobs:
- name: Generate test files list
id: set-matrix
run: |
TEST_FILES=$(ls .cypress/integration/*.{js,ts} | xargs -n 1 basename)
TEST_FILES_JSON=$(echo $TEST_FILES | jq -R -s -c 'split("\n") | map(select(length > 0)) | map("\"" + . + "\"") | join(", ")')
echo "::set-output name=matrix::{\"testfiles\": [$TEST_FILES_JSON]}"
TEST_FILES=$(ls .cypress/integration/*.{js,ts} | xargs -n 1 basename | jq -R -s -c 'split("\n") | map(select(length > 0))')
echo "::set-output name=matrix::{\"testfiles\": $TEST_FILES}"
- name: Print matrix output
run: echo ${{ steps.set-matrix.outputs.matrix }}
Expand Down

0 comments on commit 9625bd3

Please sign in to comment.