mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-19 12:54:45 +00:00
follow proxy settings (#105)
This commit is contained in:
parent
9a99bb3e35
commit
d123f10543
568 changed files with 15975 additions and 93743 deletions
17
__tests__/verify-no-unstaged-changes.sh
Executable file
17
__tests__/verify-no-unstaged-changes.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ "$(git status --porcelain)" != "" ]]; then
|
||||
echo ----------------------------------------
|
||||
echo git status
|
||||
echo ----------------------------------------
|
||||
git status
|
||||
echo ----------------------------------------
|
||||
echo git diff
|
||||
echo ----------------------------------------
|
||||
git diff
|
||||
echo ----------------------------------------
|
||||
echo Troubleshooting
|
||||
echo ----------------------------------------
|
||||
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && npm ci && npm run all"
|
||||
exit 1
|
||||
fi
|
19
__tests__/verify-node.sh
Executable file
19
__tests__/verify-node.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/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 init -y || exit 1
|
||||
npm install @actions/core || exit 1
|
Loading…
Add table
Add a link
Reference in a new issue