setup-node/__tests__/verify-node.sh
eric sciple e9ee86ba96 .
2020-01-24 17:18:44 -05:00

18 lines
No EOL
355 B
Bash
Executable file

#!/bin/sh
if [ -z "$1" ]; then
echo "Must supply node version argument"
exit 1
fi
node_version="$(node --version)"
echo "Found node version '$node_version'"
if [ -z "$(echo $node_version | grep v$1)" ]; then
echo "Unexpected version"
exit 1
fi
echo "Testing npm install"
mkdir -p test-npm-install
cd test-npm-install
npm install @actions/core .