You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment there's some (seemingly unnecessary) parsing of script: input, which prevents everyday usages.
Examples:
Standard Gradle or adb invocation, we all know how long the parameter list can get with filters, and instrumentation arguments, no-one wants to maintain that potentially 500 character line on a single line.
script: | command \ long \ long \ param \ list
Really simple if-else:
script: | if [[ $ENV_VAR = "xx" ]]; then x else y fi
Function definition and complex scripts.
script: | some() { ... } if [[ some() ]]; then ...; fi
The workaround is to dump the script into a file and just call the file as single command:
- name: "Prepare script to run."id: scriptenv:
SCRIPT: | # complex parts that are multiline ${{ inputs.script }}run: | script_file="${TEMP}/reactivecircus-android-emulator-runner-preapred-script.sh" echo "${SCRIPT}" > "${script_file}" echo "file=${script_file}" >> "${GITHUB_OUTPUT}"
- name: "Run Instrumentation Tests on emulator."timeout-minutes: ${{ inputs.timeout-minutes }}uses: reactivecircus/android-emulator-runner@v2with:
script: bash "${{ steps.script.outputs.file }}"
but this is so unwieldy.
Would you mind explaining why this parsing is in place, and would you be open to remove it and replace it with just executing the input as is?
(I've faced this issue about 6 times in the last few years, and always had to work around it in some way.)
The text was updated successfully, but these errors were encountered:
TWiStErRob
added a commit
to TWiStErRob/github-workflows
that referenced
this issue
Apr 27, 2024
At the moment there's some (seemingly unnecessary) parsing of
script:
input, which prevents everyday usages.Examples:
Standard Gradle or adb invocation, we all know how long the parameter list can get with filters, and instrumentation arguments, no-one wants to maintain that potentially 500 character line on a single line.
Really simple if-else:
Function definition and complex scripts.
The workaround is to dump the script into a file and just call the file as single command:
but this is so unwieldy.
Would you mind explaining why this parsing is in place, and would you be open to remove it and replace it with just executing the input as is?
(I've faced this issue about 6 times in the last few years, and always had to work around it in some way.)
The text was updated successfully, but these errors were encountered: