[Tests] move sourcing suite to GHA

This commit is contained in:
Jordan Harband
2024-08-22 13:30:55 -07:00
parent df70535248
commit 0d53381666
10 changed files with 45 additions and 22 deletions

View File

@@ -2,6 +2,7 @@
\. ../common.sh
die () { echo "$@" ; exit 1; }
supports_source_options () {
[ "_$(echo 'echo $1' | . /dev/stdin yes)" = "_yes" ]
}
@@ -11,6 +12,8 @@ if ! supports_source_options; then
exit 0;
fi
rm .nvmrc
export NVM_DIR="${PWD}/../.."
echo '0.10.2' > ../../alias/default || die 'creation of default alias failed'
echo 'sourcing nvm with --install...'
@@ -20,6 +23,8 @@ EXIT_CODE="$?"
echo 'sourcing complete.'
[ "$(nvm_alias default)" = '0.10.2' ] || die "nvm_alias default did not return '0.10.2', got >$(nvm_alias default)<"
nvm_version 0.10.2 >/dev/null 2>&1 || die "v0.10.2 not installed: \n$(nvm_ls)"
[ "_$EXIT_CODE" = '_0' ] || die "sourcing returned nonzero exit code: ${EXIT_CODE}"