Skip to content

Commit

Permalink
Update scripts-testing.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ale5000-git authored Oct 10, 2024
1 parent 018c043 commit f3dc90d
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/scripts-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,21 @@ jobs:
bash --version | head -n 1
# shellcheck disable=SC2016 # Intended: Expressions don't expand in single quotes
readonly workspace_dir='${{ github.workspace }}'
test_on_all_shells()
{
local _shell _script
_script="${1:?}"
for _shell in sh bash dash ksh zsh osh csh tcsh tclsh; do
if ! command 1> /dev/null -v "${_shell}"; then continue; fi
printf '\nSHELL: %s - SCRIPT: "%s"\n\n' "${_shell}" "${_script}"
bash "${workspace_dir}/${_script}"
printf '\nRETURN CODE:%s\n' "${?}"
done
}
export ONLY_FOR_TESTING='true'
for _script in 'tools/bits-info.sh' 'cmdline.sh'; do
printf '\nSCRIPT "%s":\n\n' "${_script}"
bash "${workspace_dir}/${_script}"
printf '\nRETURN CODE:%s\n' "${?}"
test_on_all_shells "${workspace_dir}/${_script}"
printf '\n---\n'
done
- name: "Test script on Oils (only under macOS-latest)"
if: "${{ matrix.os == 'macos-latest' }}"
Expand Down

0 comments on commit f3dc90d

Please sign in to comment.