Skip to content

Commit 0884264

Browse files
committed
chore(firebolt-driver): setup CI tests
1 parent 904bb74 commit 0884264

File tree

6 files changed

+64
-5
lines changed

6 files changed

+64
-5
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: 1 addition & 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

packages/cubejs-firebolt-driver/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,14 @@
3737
"devDependencies": {
3838
"@cubejs-backend/linter": "^1.0.0",
3939
"@cubejs-backend/testing-shared": "1.1.7",
40+
"jest-environment-node": "^27.5.1",
4041
"typescript": "~5.2.2"
4142
},
4243
"publishConfig": {
4344
"access": "public"
4445
},
4546
"jest": {
46-
"testEnvironment": "node"
47+
"testEnvironment": "./test/test-env.js"
4748
},
4849
"eslintConfig": {
4950
"extends": "../cubejs-linter"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
const NodeEnvironment = require('jest-environment-node');
2+
3+
const REQUIRED_ENV_VARS = [
4+
'CUBEJS_DB_USER',
5+
'CUBEJS_DB_PASS',
6+
'CUBEJS_DB_NAME',
7+
'CUBEJS_FIREBOLT_ENGINE_NAME',
8+
'CUBEJS_FIREBOLT_ACCOUNT',
9+
];
10+
11+
class CustomEnvironment extends NodeEnvironment {
12+
async setup() {
13+
REQUIRED_ENV_VARS.forEach((key) => {
14+
// Trying to populate from DRIVERS_TESTS_* vars
15+
if (process.env[`DRIVERS_TESTS_FIREBOLT_${key}`] !== undefined) {
16+
this.global.process.env[key] = process.env[`DRIVERS_TESTS_FIREBOLT_${key}`];
17+
}
18+
});
19+
await super.setup();
20+
}
21+
}
22+
23+
module.exports = CustomEnvironment;

yarn.lock

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27222,7 +27222,7 @@ string-length@^5.0.1:
2722227222
char-regex "^2.0.0"
2722327223
strip-ansi "^7.0.1"
2722427224

27225-
"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3:
27225+
"string-width-cjs@npm:string-width@^4.2.0":
2722627226
version "4.2.3"
2722727227
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
2722827228
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -27240,6 +27240,15 @@ string-width@^1.0.1:
2724027240
is-fullwidth-code-point "^1.0.0"
2724127241
strip-ansi "^3.0.0"
2724227242

27243+
"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3:
27244+
version "4.2.3"
27245+
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
27246+
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
27247+
dependencies:
27248+
emoji-regex "^8.0.0"
27249+
is-fullwidth-code-point "^3.0.0"
27250+
strip-ansi "^6.0.1"
27251+
2724327252
string-width@^2.1.1:
2724427253
version "2.1.1"
2724527254
resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
@@ -27338,7 +27347,7 @@ string_decoder@~1.1.1:
2733827347
dependencies:
2733927348
safe-buffer "~5.1.0"
2734027349

27341-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
27350+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
2734227351
version "6.0.1"
2734327352
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
2734427353
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -27366,6 +27375,13 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0:
2736627375
dependencies:
2736727376
ansi-regex "^4.1.0"
2736827377

27378+
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
27379+
version "6.0.1"
27380+
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
27381+
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
27382+
dependencies:
27383+
ansi-regex "^5.0.1"
27384+
2736927385
strip-ansi@^7.0.1:
2737027386
version "7.1.0"
2737127387
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
@@ -29682,7 +29698,7 @@ wordwrap@^1.0.0:
2968229698
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
2968329699
integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=
2968429700

29685-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
29701+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
2968629702
version "7.0.0"
2968729703
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
2968829704
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -29717,6 +29733,15 @@ wrap-ansi@^6.2.0:
2971729733
string-width "^4.1.0"
2971829734
strip-ansi "^6.0.0"
2971929735

29736+
wrap-ansi@^7.0.0:
29737+
version "7.0.0"
29738+
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
29739+
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
29740+
dependencies:
29741+
ansi-styles "^4.0.0"
29742+
string-width "^4.1.0"
29743+
strip-ansi "^6.0.0"
29744+
2972029745
wrap-ansi@^8.1.0:
2972129746
version "8.1.0"
2972229747
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"

0 commit comments

Comments
 (0)