Skip to content

Commit 83334fe

Browse files
committed
chore(firebolt-driver): setup CI tests
1 parent 04d6c4e commit 83334fe

File tree

6 files changed

+37
-3
lines changed

6 files changed

+37
-3
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
set -eo pipefail
3+
4+
# Debug log for test containers
5+
export DEBUG=testcontainers
6+
7+
echo "::group::Firebolt [cloud]"
8+
yarn lerna run --concurrency 1 --stream --no-prefix integration:firebolt
9+
10+
echo "::endgroup::"

.github/workflows/push.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ jobs:
319319
node-version: [20.x]
320320
db: [
321321
'clickhouse', 'druid', 'elasticsearch', 'mssql', 'mysql', 'postgres', 'prestodb',
322-
'mysql-aurora-serverless', 'crate', 'mongobi'
322+
'mysql-aurora-serverless', 'crate', 'mongobi', 'firebolt'
323323
]
324324
fail-fast: false
325325

@@ -370,6 +370,13 @@ jobs:
370370
retry_wait_seconds: 15
371371
timeout_minutes: 30
372372
command: ./.github/actions/integration/${{ matrix.db }}.sh
373+
env:
374+
# Firebolt Integration
375+
DRIVERS_TESTS_FIREBOLT_CUBEJS_FIREBOLT_ENGINE_NAME: ${{ secrets.DRIVERS_TESTS_FIREBOLT_CUBEJS_FIREBOLT_ENGINE_NAME }}
376+
DRIVERS_TESTS_FIREBOLT_CUBEJS_DB_NAME: ${{ secrets.DRIVERS_TESTS_FIREBOLT_CUBEJS_DB_NAME }}
377+
DRIVERS_TESTS_FIREBOLT_CUBEJS_FIREBOLT_ACCOUNT: ${{ secrets.DRIVERS_TESTS_FIREBOLT_CUBEJS_FIREBOLT_ACCOUNT }}
378+
DRIVERS_TESTS_FIREBOLT_CUBEJS_DB_USER: ${{ secrets.DRIVERS_TESTS_FIREBOLT_CUBEJS_DB_USER }}
379+
DRIVERS_TESTS_FIREBOLT_CUBEJS_DB_PASS: ${{ secrets.DRIVERS_TESTS_FIREBOLT_CUBEJS_DB_PASS }}
373380

374381
integration-smoke:
375382
needs: [ latest-tag-sha, build-cubestore ]

packages/cubejs-firebolt-driver/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@
4343
"access": "public"
4444
},
4545
"jest": {
46-
"testEnvironment": "node"
46+
"testEnvironment": "node",
47+
"setupFiles": [
48+
"./test/test-env.js"
49+
]
4750
},
4851
"eslintConfig": {
4952
"extends": "../cubejs-linter"

packages/cubejs-firebolt-driver/test/autostart.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {assertDataSource, getEnv} from '@cubejs-backend/shared';
1+
import { assertDataSource, getEnv } from '@cubejs-backend/shared';
22
import { DriverTests } from '@cubejs-backend/testing-shared';
33

44
import { Firebolt } from 'firebolt-sdk';
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const REQUIRED_ENV_VARS = [
2+
'CUBEJS_DB_USER',
3+
'CUBEJS_DB_PASS',
4+
'CUBEJS_DB_NAME',
5+
'CUBEJS_FIREBOLT_ENGINE_NAME',
6+
'CUBEJS_FIREBOLT_ACCOUNT',
7+
];
8+
9+
REQUIRED_ENV_VARS.forEach((key) => {
10+
// Trying to populate from DRIVERS_TESTS_FIREBOLT_* vars
11+
if (process.env[`DRIVERS_TESTS_FIREBOLT_${key}`] !== undefined) {
12+
process.env[key] = process.env[`DRIVERS_TESTS_FIREBOLT_${key}`];
13+
}
14+
});

0 commit comments

Comments
 (0)