compare-versions-pip-and-pipx #106
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: compare-versions-pip-and-pipx | |
on: | |
push: | |
branches: | |
- '*' | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
compare-versions-pip-and-pipx: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-latest | |
- ubuntu-latest | |
- windows-latest | |
name: Install Snowflake CLI in ${{ matrix.os }} with pipx first and then with pip | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install Snowflake CLI with pip | |
run: | | |
python -m pip install snowflake-cli | |
- name: Store snow version | |
shell: bash | |
run: | | |
snow --version >> version_output.txt | |
echo "snow_version_pip=$(cat version_output.txt)" >> $GITHUB_ENV | |
- name: Install Snowflake CLI with pipx | |
uses: ./ | |
id: setup_snowcli | |
with: | |
default-config-file-path: '.github/workflows/tests-files/config.toml' | |
- name: Compare pipx and pip versions | |
shell: bash | |
run: | | |
snow_version_pipx=$(snow --version) | |
snow_version_pip="${{ env.snow_version_pip }}" | |
if [ "$snow_version_pipx" == "$snow_version_pip" ]; then | |
echo "The versions match: $snow_version_pipx" | |
else | |
echo "The versions do not match: pipx version is $snow_version_pipx, but expected version is $snow_version_pip" | |
exit 1 | |
fi | |