Skip to content

Commit a0b230d

Browse files
committed
testing changes dev-1
1 parent 22b3cd1 commit a0b230d

File tree

1 file changed

+36
-2
lines changed

1 file changed

+36
-2
lines changed

.github/workflows/snowpark-ci-cd.yml

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,40 @@ jobs:
2929
run: |
3030
python -m pip install --upgrade pip
3131
pip install -r requirements.txt
32+
- name: Setup Snowflake connection profiles for testing
33+
run: |
34+
mkdir -p ~/.snowflake
35+
36+
# Create connection profile for testing
37+
cat > ~/.snowflake/connections.toml << EOF
38+
[default]
39+
account = "${{ secrets.SNOWFLAKE_ACCOUNT }}"
40+
user = "${{ secrets.SNOWFLAKE_USER }}"
41+
password = "${{ secrets.SNOWFLAKE_PASSWORD }}"
42+
warehouse = "CO2_WH"
43+
database = "$DATABASE_NAME"
44+
schema = "$SCHEMA_NAME"
45+
46+
[dev]
47+
account = "${{ secrets.SNOWFLAKE_ACCOUNT }}"
48+
user = "${{ secrets.SNOWFLAKE_USER }}"
49+
password = "${{ secrets.SNOWFLAKE_PASSWORD }}"
50+
warehouse = "CO2_WH_DEV"
51+
role = "CO2_ROLE_DEV"
52+
database = "CO2_DB_DEV"
53+
schema = "RAW_CO2"
54+
55+
[prod]
56+
account = "${{ secrets.SNOWFLAKE_ACCOUNT }}"
57+
user = "${{ secrets.SNOWFLAKE_USER }}"
58+
password = "${{ secrets.SNOWFLAKE_PASSWORD }}"
59+
warehouse = "CO2_WH_PROD"
60+
role = "CO2_ROLE_PROD"
61+
database = "CO2_DB_PROD"
62+
schema = "RAW_CO2"
63+
EOF
64+
65+
chmod 600 ~/.snowflake/connections.toml
3266
- name: Run tests
3367
run: |
3468
pytest tests/testing_snowflake_connection.py
@@ -97,7 +131,7 @@ jobs:
97131
mkdir -p ~/.snowflake
98132
99133
# Create connection profile for the environment
100-
cat > ~/.snowflake/config.toml << EOF
134+
cat > ~/.snowflake/connections.toml << EOF
101135
[connections.dev]
102136
account = "${{ secrets.SNOWFLAKE_ACCOUNT }}"
103137
user = "${{ secrets.SNOWFLAKE_USER }}"
@@ -117,7 +151,7 @@ jobs:
117151
schema = "RAW_CO2"
118152
EOF
119153
120-
chmod 600 ~/.snowflake/config.toml
154+
chmod 600 ~/.snowflake/connections.toml
121155
122156
- name: Generate configuration and SQL files
123157
run: |

0 commit comments

Comments
 (0)