Skip to content

Commit f89d1e4

Browse files
committed
Add action_test.sh script
1 parent 1ea6da3 commit f89d1e4

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

action_test.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
export ACTION_TEST_DIR="$(pwd)/.test"
3+
4+
# Runner environment variables
5+
export RUNNER_TOOL_CACHE="$ACTION_TEST_DIR/tool_cache"
6+
export RUNNER_TEMP="$ACTION_TEST_DIR/temp"
7+
export RUNNER_ARCH=$(uname -m)
8+
export RUNNER_OS=$(uname -s | tr '[:upper:]' '[:lower:]')
9+
if [ "$RUNNER_OS" = "darwin" ]; then
10+
export RUNNER_OS="macos"
11+
fi
12+
13+
# GitHub Context
14+
export GITHUB_ENV="$ACTION_TEST_DIR/.env"
15+
export GITHUB_PATH="$ACTION_TEST_DIR/.path"
16+
17+
mkdir -p "$RUNNER_TOOL_CACHE" "$RUNNER_TEMP"
18+
exec ./action.sh "$@"

0 commit comments

Comments
 (0)