[SNOW-90] Introduce CI job to test schemachange
updates against a clone
#24
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: Test Changes with Cloned DB | |
on: | |
push: | |
branches: "main" | |
pull_request: | |
types: [ labeled ] | |
permissions: | |
contents: read | |
jobs: | |
test_with_clone: | |
runs-on: ubuntu-latest | |
if: contains(github.event.pull_request.labels.*.name, 'test_with_clone') | |
env: | |
SNOWSQL_PWD: ${{ secrets.SNOWSQL_PWD }} | |
SNOWSQL_ACCOUNT: ${{ secrets.SNOWSQL_ACCOUNT }} | |
SNOWSQL_USER: ${{ secrets.SNOWSQL_USER }} | |
SNOWSQL_WAREHOUSE: ${{ secrets.SNOWSQL_WAREHOUSE }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: install-py-dependencies | |
shell: bash | |
run: | | |
pip install schemachange==3.6.1 | |
pip install numpy==1.26.4 | |
pip install pandas==1.5.3 | |
- name: Install SnowSQL | |
run: | | |
curl -O https://sfc-repo.snowflakecomputing.com/snowsql/bootstrap/1.2/linux_x86_64/snowsql-1.2.9-linux_x86_64.bash | |
SNOWSQL_DEST=~/bin SNOWSQL_LOGIN_SHELL=~/.profile bash snowsql-1.2.9-linux_x86_64.bash | |
- name: zero-copy clone the database | |
shell: bash | |
run: | | |
~/bin/snowsql -f admin/clone_db.sql --variable cloned_db_name=test123 |