File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -174,6 +174,13 @@ jobs:
174174 timeout-minutes : 30
175175 needs : [latest-tag-sha, build]
176176 if : (needs['latest-tag-sha'].outputs.sha != github.sha)
177+ env :
178+ CLOUD_DATABASES : athena bigquery databricks-jdbc databricks-jdbc-export-bucket snowflake
179+ # As per docs:
180+ # Secrets cannot be directly referenced in if: conditionals. Instead, consider setting
181+ # secrets as job-level environment variables, then referencing the environment variables
182+ # to conditionally run steps in the job.
183+ DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY : ${{ secrets.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY }}
177184 strategy :
178185 matrix :
179186 node :
@@ -239,6 +246,10 @@ jobs:
239246
240247 - name : Run tests
241248 uses : nick-fields/retry@v3
249+ # It's enough to test for any one secret because they are set all at once or not set all
250+ if : |
251+ (contains(env.CLOUD_DATABASES, matrix.database) && env.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY != '') ||
252+ (!contains(env.CLOUD_DATABASES, matrix.database))
242253 env :
243254 # Athena
244255 DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY : ${{ secrets.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY }}
You can’t perform that action at this time.
0 commit comments