Skip to content

Commit

Permalink
deploy udf test
Browse files Browse the repository at this point in the history
  • Loading branch information
kaarthik108 committed Sep 24, 2023
1 parent ffba033 commit 08384bf
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 18 deletions.
46 changes: 30 additions & 16 deletions .github/workflows/snowflake_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ jobs:
with:
python-version: "3.10"

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
Expand All @@ -47,21 +56,26 @@ jobs:
cd src
IFS=$'\n'
for file in ${{ steps.changed-files.outputs.all_modified_files }}; do
dir=$(dirname $file)
component_type=$(basename $dir)
case $component_type in
task)
poetry run snowdev deploy --task $dir || continue
;;
streamlit)
poetry run snowdev deploy --streamlit $dir || continue
;;
udf)
poetry run snowdev deploy --udf $dir || continue
;;
sproc)
poetry run snowdev deploy --sproc $dir || continue
;;
esac
# Extract the path relative to src
rel_path="${file#src/}"
component_type=$(echo $rel_path | cut -d'/' -f1)
component_name=$(echo $rel_path | cut -d'/' -f2)
echo "Component Type: $component_type"
echo "Component Name: $component_name"
case $component_type in
task)
poetry run snowdev deploy --task $component_name || continue
;;
streamlit)
poetry run snowdev deploy --streamlit $component_name || continue
;;
udf)
poetry run snowdev deploy --udf $component_name || continue
;;
sproc)
poetry run snowdev deploy --sproc $component_name || continue
;;
esac
done
continue-on-error: true
3 changes: 1 addition & 2 deletions src/udf/test_new_/app.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ role = ""
[tool.poetry.dependencies]
python = "3.10.0"
snowflake-snowpark-python = "1.5.1"
pandas = "2.0.3"

pandas = "2.0.3"

0 comments on commit 08384bf

Please sign in to comment.