29
29
run : |
30
30
python -m pip install --upgrade pip
31
31
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
32
66
- name : Run tests
33
67
run : |
34
68
pytest tests/testing_snowflake_connection.py
97
131
mkdir -p ~/.snowflake
98
132
99
133
# Create connection profile for the environment
100
- cat > ~/.snowflake/config .toml << EOF
134
+ cat > ~/.snowflake/connections .toml << EOF
101
135
[connections.dev]
102
136
account = "${{ secrets.SNOWFLAKE_ACCOUNT }}"
103
137
user = "${{ secrets.SNOWFLAKE_USER }}"
@@ -117,7 +151,7 @@ jobs:
117
151
schema = "RAW_CO2"
118
152
EOF
119
153
120
- chmod 600 ~/.snowflake/config .toml
154
+ chmod 600 ~/.snowflake/connections .toml
121
155
122
156
- name : Generate configuration and SQL files
123
157
run : |
0 commit comments