mise-action/scripts/test.sh
Victor LEFEBVRE 923c9f44ed
Fix alpine container installation (#189)
* 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
2025-05-12 07:15:17 -05:00

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