mirror of
https://github.com/jdx/mise-action.git
synced 2026-05-14 13:50:33 +00:00
* Change test tool for future alpine CI testing * replace node with jq as it doesnt require any build on alpine * Fix alpine musl container install * add tests around mise install in alpine container * add support for musl os Fixes: https://github.com/jdx/mise-action/issues/186 * alpine needs bash to run test.sh script * remove unneeded logs * Update test.yml * Update test.yml
18 lines
413 B
Bash
Executable file
18 lines
413 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -euxo pipefail
|
|
|
|
function assert_equal() {
|
|
if [ "$1" != "$2" ]; then
|
|
echo "Assertion failed: Expected '$1', got '$2'" >&2
|
|
return 1
|
|
fi
|
|
}
|
|
EXPECTED_OUTPUT="jq-1.7.1"
|
|
|
|
assert_equal "$EXPECTED_OUTPUT" "$(mise exec -- jq --version)"
|
|
which jq
|
|
|
|
# windows bash does not seem to work with shims
|
|
if [[ "$(uname)" != "MINGW"* ]]; then
|
|
assert_equal "$EXPECTED_OUTPUT" "$(jq --version)"
|
|
fi
|