NO-SNOW: Tests Cleanup #541
This file contains hidden or 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: Test Installation | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| pull_request: | |
| branches: | |
| - '**' | |
| workflow_dispatch: | |
| concurrency: | |
| # older builds for the same pull request number or branch should be cancelled | |
| cancel-in-progress: true | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| jobs: | |
| test-installation-boto: | |
| name: Test boto dependency | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.12 | |
| - name: Test default installation (should include boto) | |
| shell: bash | |
| run: | | |
| python -m venv test_default_env | |
| source test_default_env/bin/activate | |
| python -m pip install . | |
| pip freeze | grep boto || exit 1 # boto3/botocore should be installed by default | |
| # Deactivate and clean up | |
| deactivate | |
| rm -rf test_default_env | |
| - name: Test installation with SNOWFLAKE_NO_BOTO=1 (should exclude boto) | |
| shell: bash | |
| run: | | |
| python -m venv test_no_boto_env | |
| source test_no_boto_env/bin/activate | |
| SNOWFLAKE_NO_BOTO=1 python -m pip install . | |
| # Check that boto3 and botocore are NOT installed | |
| pip freeze | grep boto && exit 1 # boto3 and botocore should be not installed | |
| # Deactivate and clean up | |
| deactivate | |
| rm -rf test_no_boto_env | |
| test-installation-aioboto: | |
| name: Test aioboto dependency | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.12 | |
| - name: Test installation with [aio] (should include aioboto) | |
| shell: bash | |
| run: | | |
| python -m venv test_no_boto_env | |
| source test_no_boto_env/bin/activate | |
| python -m pip install '.[aio]' | |
| # Check that aioboto3 and aiobotocore are installed | |
| pip freeze | grep aioboto || exit 1 # aioboto3 and aiobotocore should be installed | |
| # Deactivate and clean up | |
| deactivate | |
| rm -rf test_no_boto_env | |
| - name: Test [aio] installation with SNOWFLAKE_NO_BOTO=1 (should exclude aioboto) | |
| shell: bash | |
| run: | | |
| python -m venv test_no_boto_env | |
| source test_no_boto_env/bin/activate | |
| SNOWFLAKE_NO_BOTO=1 python -m pip install . | |
| # Check that boto3, botocore, aioboto, aiobotocore are NOT installed | |
| pip freeze | grep boto && exit 1 | |
| # Deactivate and clean up | |
| deactivate | |
| rm -rf test_no_boto_env |