8484 name : Build native Linux ${{ matrix.node-version }} ${{ matrix.target }} Python ${{ matrix.python-version }}
8585 strategy :
8686 matrix :
87- node-version : [ 18 ]
87+ node-version : [ 20 ]
8888 python-version : [ "fallback" ]
8989 target : [ "x86_64-unknown-linux-gnu" ]
9090 fail-fast : false
@@ -109,7 +109,7 @@ jobs:
109109 - name : Install Yarn
110110 run : npm install -g yarn
111111 - name : Set Yarn version
112- run : yarn policies set-version v1.22.19
112+ run : yarn policies set-version v1.22.22
113113 - name : Install cargo-cp-artifact
114114 run :
npm install -g [email protected] 115115 - uses : Swatinem/rust-cache@v2
@@ -144,6 +144,8 @@ jobs:
144144 if : (needs['latest-tag-sha'].outputs.sha != github.sha)
145145 runs-on : ubuntu-20.04
146146 timeout-minutes : 30
147+ env :
148+ DOCKERHUB_USERNAME : ${{ secrets.DOCKERHUB_USERNAME }}
147149 steps :
148150 - name : Check out the repo
149151 uses : actions/checkout@v4
@@ -154,6 +156,7 @@ jobs:
154156 with :
155157 username : ${{ secrets.DOCKERHUB_USERNAME }}
156158 password : ${{ secrets.DOCKERHUB_TOKEN }}
159+ if : (env.DOCKERHUB_USERNAME != '')
157160 - name : Set up QEMU
158161 uses : docker/setup-qemu-action@v3
159162 - name : Download native build
@@ -167,40 +170,79 @@ jobs:
167170 context : .
168171 file : ./packages/cubejs-docker/testing-drivers.Dockerfile
169172 tags : cubejs/cube:testing-drivers
170- push : true
173+ push : ${{ (env.DOCKERHUB_USERNAME != '') }}
174+ - name : Save Docker image as artifact
175+ run : |
176+ IMAGE_TAG=cubejs/cube:testing-drivers
177+ docker save -o image.tar $IMAGE_TAG
178+ gzip image.tar
179+ continue-on-error : true
180+ - name : Upload Docker image artifact
181+ uses : actions/upload-artifact@v4
182+ with :
183+ name : docker-image
184+ path : image.tar.gz
171185
172186 tests :
173187 runs-on : ubuntu-20.04
174188 timeout-minutes : 30
175189 needs : [latest-tag-sha, build]
176190 if : (needs['latest-tag-sha'].outputs.sha != github.sha)
191+ env :
192+ CLOUD_DATABASES : >
193+ athena-export-bucket-s3
194+ bigquery-export-bucket-gcs
195+ clickhouse-export-bucket-s3
196+ databricks-jdbc
197+ databricks-jdbc-export-bucket-s3
198+ databricks-jdbc-export-bucket-azure
199+ redshift
200+ redshift-export-bucket-s3
201+ snowflake
202+ snowflake-export-bucket-s3
203+ snowflake-export-bucket-azure
204+ snowflake-export-bucket-azure-via-storage-integration
205+ snowflake-export-bucket-gcs
206+ # As per docs:
207+ # Secrets cannot be directly referenced in if: conditionals. Instead, consider setting
208+ # secrets as job-level environment variables, then referencing the environment variables
209+ # to conditionally run steps in the job.
210+ DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY : ${{ secrets.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY }}
177211 strategy :
178212 matrix :
179213 node :
180- - 18 .x
214+ - 20 .x
181215 database :
182- - athena
183- - bigquery
216+ - athena-export-bucket-s3
217+ - bigquery-export-bucket-gcs
184218 - clickhouse
219+ - clickhouse-export-bucket-s3
185220 - databricks-jdbc
186- - databricks-jdbc-export-bucket
221+ - databricks-jdbc-export-bucket-s3
222+ - databricks-jdbc-export-bucket-azure
187223 - mssql
188224 - mysql
189225 - postgres
226+ - redshift
227+ - redshift-export-bucket-s3
190228 - snowflake
229+ - snowflake-export-bucket-s3
230+ - snowflake-export-bucket-azure
231+ - snowflake-export-bucket-azure-via-storage-integration
232+ - snowflake-export-bucket-gcs
191233 fail-fast : false
192234
193235 steps :
194236 - name : Checkout
195237 uses : actions/checkout@v4
196238
197- - name : Install Node.js 18 .x
239+ - name : Install Node.js 20 .x
198240 uses : actions/setup-node@v4
199241 with :
200- node-version : 18 .x
242+ node-version : 20 .x
201243
202244 - name : Configure `yarn`
203- run : yarn policies set-version v1.22.19
245+ run : yarn policies set-version v1.22.22
204246
205247 - name : Get yarn cache directory path
206248 id : yarn-cache-dir-path
@@ -237,7 +279,22 @@ jobs:
237279 cd packages/cubejs-testing-drivers
238280 yarn tsc
239281
282+ - name : Download Docker image artifact
283+ uses : actions/download-artifact@v4
284+ with :
285+ name : docker-image
286+
287+ - name : Load Docker image into Docker Daemon
288+ run : |
289+ gunzip image.tar.gz
290+ docker load -i image.tar
291+
240292 - name : Run tests
293+ uses : nick-fields/retry@v3
294+ # It's enough to test for any one secret because they are set all at once or not set all
295+ if : |
296+ (contains(env.CLOUD_DATABASES, matrix.database) && env.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY != '') ||
297+ (!contains(env.CLOUD_DATABASES, matrix.database))
241298 env :
242299 # Athena
243300 DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY : ${{ secrets.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY }}
@@ -246,16 +303,34 @@ jobs:
246303 # BigQuery
247304 DRIVERS_TESTS_CUBEJS_DB_BQ_CREDENTIALS : ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_BQ_CREDENTIALS }}
248305
306+ # GCS
307+ DRIVERS_TESTS_CUBEJS_DB_EXPORT_GCS_CREDENTIALS : ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_EXPORT_GCS_CREDENTIALS }}
308+
309+ # Azure
310+ DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AZURE_KEY : ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AZURE_KEY }}
311+ DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AZURE_SAS_TOKEN : ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AZURE_SAS_TOKEN }}
312+
249313 # Databricks
250314 DRIVERS_TESTS_CUBEJS_DB_DATABRICKS_URL : ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_DATABRICKS_URL }}
251315 DRIVERS_TESTS_CUBEJS_DB_DATABRICKS_TOKEN : ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_DATABRICKS_TOKEN }}
252316 DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AWS_KEY : ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AWS_KEY }}
253317 DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AWS_SECRET : ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AWS_SECRET }}
254318
319+ # Redshift
320+ DRIVERS_TESTS_CUBEJS_DB_REDSHIFT_HOST : ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_REDSHIFT_HOST }}
321+ DRIVERS_TESTS_CUBEJS_DB_REDSHIFT_USER : ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_REDSHIFT_USER }}
322+ DRIVERS_TESTS_CUBEJS_DB_REDSHIFT_PASS : ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_REDSHIFT_PASS }}
323+
255324 # Snowflake
256325 DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_USER : ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_USER }}
257326 DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_PASS : ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_PASS }}
258- run : |
259- cd ./packages/cubejs-testing-drivers
260- export DEBUG=testcontainers
261- yarn ${{ matrix.database }}-full
327+ with :
328+ max_attempts : 3
329+ retry_on : error
330+ retry_wait_seconds : 15
331+ timeout_minutes : 20
332+ command : |
333+ cd ./packages/cubejs-testing-drivers
334+ export DEBUG=testcontainers
335+ yarn ${{ matrix.database }}-full
336+
0 commit comments