-
Notifications
You must be signed in to change notification settings - Fork 6
51 lines (41 loc) · 1.52 KB
/
install-snowcli-with-pip-first-then-with-pipx-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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-labs
- 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