-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix unbound environment variable (#18)
- Remove connection test - Fix unbound variable issue
- Loading branch information
1 parent
5d6c323
commit 3d2795e
Showing
3 changed files
with
49 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,5 +32,4 @@ jobs: | |
shell: bash | ||
run: | | ||
snow --version | ||
snow connection list | ||
snow connection test | ||
snow connection list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: set-unboud-pipx-variable-test | ||
on: [push] | ||
|
||
jobs: | ||
set-unboud-pipx-variable-test: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- macos-latest | ||
- ubuntu-latest | ||
- windows-latest | ||
|
||
env: | ||
SNOWFLAKE_CONNECTIONS_MYCONNECTION_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }} | ||
SNOWFLAKE_CONNECTIONS_MYCONNECTION_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }} | ||
PIPX_BIN_DIR: null | ||
|
||
name: Install Snowflake CLI in ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Snowflake CLI | ||
uses: ./ | ||
id: setup_snowcli | ||
with: | ||
cli-version: '2.1.0' | ||
default-config-file-path: '.github/workflows/tests-files/config.toml' | ||
|
||
- name: Test connection | ||
shell: bash | ||
run: | | ||
snow --version | ||
snow connection list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
#!/bin/sh | ||
|
||
set -euo pipefail | ||
PIPX_PATH="snow_pipx_path" | ||
|
||
# These commands ensure that each time `snow` command is executed the system will use | ||
# the executable in the pipx installation folder and not in any other installation folder. | ||
if [ -z "${PIPX_BIN_DIR}" ]; then | ||
export PIPX_BIN_DIR="~/.local/bin/$PIPX_PATH" | ||
else | ||
export PIPX_BIN_DIR="$PIPX_BIN_DIR/$PIPX_PATH" | ||
fi | ||
|
||
mkdir -p "$PIPX_BIN_DIR" | ||
|
||
|
||
if [ "$CLI_VERSION" == "latest" ]; then | ||
pipx install snowflake-cli-labs | ||
else | ||
pipx install snowflake-cli-labs==$CLI_VERSION | ||
fi | ||
|
||
extension="" | ||
if [[ $RUNNER_OS = "Windows" ]]; then | ||
extension=".exe" | ||
fi | ||
|
||
# These commands ensure that each time `snow` command is executed the system will use | ||
# the executable in the pipx installation folder and not in any other installation folder. | ||
mkdir "$PIPX_BIN_DIR/snow_pipx_path" | ||
cp "$PIPX_BIN_DIR/snow$extension" "$PIPX_BIN_DIR/snow_pipx_path" | ||
echo "$PIPX_BIN_DIR/snow_pipx_path" >> $GITHUB_PATH | ||
echo "$PIPX_BIN_DIR" >> $GITHUB_PATH |