Use installed pythonpah #98
Workflow file for this run
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
name: install-snowcli-with-pip-first-and-then-with-pipx | |
on: [push] | |
jobs: | |
install-snowcli-with-pip-first-and-then-with-pipx: | |
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 }} | |
name: Install Snowflake CLI in ${{ matrix.os }} with pipx first and then with pip | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install Snowflake CLI with pip | |
run: python -m pip install snowflake-cli | |
- name: Install Snowflake CLI with pipx | |
uses: ./ | |
id: setup_snowcli | |
with: | |
default-config-file-path: '.github/workflows/tests-files/config.toml' | |
- name: Test snow installation | |
shell: bash | |
run: | | |
current_path=$(which snow) | |
snow_expected_path="$PIPX_BIN_DIR/snow_pipx_path/snow" | |
if [[ $RUNNER_OS = "Windows" ]]; then | |
snow_expected_path="/c/Program Files (x86)/pipx_bin/snow_pipx_path/snow" | |
fi | |
if [[ "$current_path" != "$snow_expected_path" ]] | |
then | |
echo "Using snow installed in $current_path, should be the version installed in $snow_expected_path" | |
exit 1 | |
fi | |