Skip to content

Commit

Permalink
Error handling and reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
lmbarros committed Jun 6, 2024
1 parent 9fadade commit 3f70386
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/yocto-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,21 +135,13 @@ on:
description: "JSON list with the test suites to run."
required: false
type: string
default: >
[
"os",
"hup",
"cloud"
]
default: [ "os", "hup", "cloud" ]

Check failure on line 138 in .github/workflows/yocto-build-deploy.yml

View workflow job for this annotation

GitHub Actions / Flowzone / Lint workflows

expected scalar node for string value but found sequence node with "!!seq" tag
test-workers:
description: "JSON list of worker types to use for testing. Valid element values are `qemu` and `testbot`."
required: false
type: string
# Most devices use "testbot", so "qemu" is the exception and should be set at the device repo level
default: >
[
"testbot"
]
default: [ "testbot" ]

Check failure on line 144 in .github/workflows/yocto-build-deploy.yml

View workflow job for this annotation

GitHub Actions / Flowzone / Lint workflows

expected scalar node for string value but found sequence node with "!!seq" tag
worker-fleets:
description: "Testbot fleet for finding available Leviathan workers. Not used for QEMU workers. Can accept a list of apps separated by commas, no spaces in between."
type: string
Expand Down Expand Up @@ -986,6 +978,11 @@ jobs:
"WORKER_TYPE": ${{ inputs.test-workers }}
}
run: |
# Validate inputs meant to be JSON arrays.
echo ${{ inputs.runs-on }} | jq ".[]" || echo "INPUT ERROR: runs-on must be JSON array, got ${{ inputs.test-suites }}"
echo ${{ inputs.test-suites }} | jq ".[]" || echo "INPUT ERROR: test-suites must be JSON array, got ${{ inputs.test-suites }}"
echo ${{ inputs.test-workers }} | jq ".[]" || echo "INPUT ERROR: test-workers must be JSON array, got ${{ inputs.test-suites }}"
echo $json
json=$(jq -e -c . <<<"${MATRIX}") || exit $?
echo "json=${json}" >> "${GITHUB_OUTPUT}"
Expand Down

0 comments on commit 3f70386

Please sign in to comment.