Skip to content

Commit c8f1461

Browse files
committed
chore(ci): Set up CI tesseract drivers testing
1 parent 40dc666 commit c8f1461

File tree

5 files changed

+43
-5
lines changed

5 files changed

+43
-5
lines changed

.github/workflows/drivers-tests.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@ on:
6868
- 'true'
6969
- 'false'
7070

71-
env:
72-
USE_TESSERACT_SQL_PLANNER: false
73-
7471
jobs:
7572
latest-tag-sha:
7673
runs-on: ubuntu-24.04
@@ -268,6 +265,12 @@ jobs:
268265
- snowflake-export-bucket-azure-via-storage-integration
269266
- snowflake-export-bucket-gcs
270267
- snowflake-export-bucket-gcs-prefix
268+
use_tesseract_sql_planner: [ false ]
269+
include:
270+
- database: postgres
271+
use_tesseract_sql_planner: true
272+
- database: bigquery-export-bucket-gcs
273+
use_tesseract_sql_planner: true
271274
fail-fast: false
272275

273276
steps:
@@ -334,7 +337,7 @@ jobs:
334337
(contains(env.CLOUD_DATABASES, matrix.database) && env.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY != '') ||
335338
(!contains(env.CLOUD_DATABASES, matrix.database))
336339
env:
337-
DRIVERS_TESTS_CUBEJS_TESSERACT_SQL_PLANNER: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.use_tesseract_sql_planner || env.USE_TESSERACT_SQL_PLANNER }}
340+
DRIVERS_TESTS_CUBEJS_TESSERACT_SQL_PLANNER: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.use_tesseract_sql_planner || matrix.use_tesseract_sql_planner }}
338341

339342
# Athena
340343
DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY: ${{ secrets.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY }}

packages/cubejs-testing-drivers/fixtures/bigquery.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,5 +172,20 @@
172172
"SQL API: Rollup with aliases",
173173
"SQL API: Nested Rollup over asterisk",
174174
"SQL API: Extended nested Rollup over asterisk"
175+
],
176+
"tesseractSkip": [
177+
"pre-aggregations Customers: running total without time dimension",
178+
"querying BigECommerce: null boolean",
179+
"querying BigECommerce: rolling count_distinct_approx window by 2 day",
180+
"querying BigECommerce: rolling count_distinct_approx window by 2 week",
181+
"querying BigECommerce: rolling count_distinct_approx window by 2 month",
182+
"querying BigECommerce: totalProfitYearAgo",
183+
"SQL API: post-aggregate percentage of total",
184+
"SQL API: Simple Rollup",
185+
"SQL API: Rollup over exprs",
186+
"SQL API: Nested Rollup",
187+
"SQL API: Nested Rollup with aliases",
188+
"SQL API: Timeshift measure from cube",
189+
"SQL API: SQL push down push to cube quoted alias"
175190
]
176191
}

packages/cubejs-testing-drivers/fixtures/postgres.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,5 +162,20 @@
162162
"querying BigECommerce: rolling window by 2 day without date range",
163163
"querying BigECommerce: rolling window by 2 month without date range",
164164
"querying BigECommerce: rolling window YTD without date range"
165+
],
166+
"tesseractSkip": [
167+
"pre-aggregations Customers: running total without time dimension",
168+
"querying BigECommerce: totalProfitYearAgo",
169+
"SQL API: post-aggregate percentage of total",
170+
"SQL API: Simple Rollup",
171+
"SQL API: Complex Rollup",
172+
"SQL API: Rollup with aliases",
173+
"SQL API: Rollup over exprs",
174+
"SQL API: Nested Rollup",
175+
"SQL API: Nested Rollup with aliases",
176+
"SQL API: Nested Rollup over asterisk",
177+
"SQL API: Extended nested Rollup over asterisk",
178+
"SQL API: Timeshift measure from cube",
179+
"SQL API: SQL push down push to cube quoted alias"
165180
]
166181
}

packages/cubejs-testing-drivers/src/tests/testQueries.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ export function testQueries(type: string, { includeIncrementalSchemaSuite, exten
2626
describe(`Queries with the @cubejs-backend/${type}-driver${extendedEnv ? ` ${extendedEnv}` : ''}`, () => {
2727
jest.setTimeout(60 * 5 * 1000);
2828

29+
const isTesseractEnv = process.env.DRIVERS_TESTS_CUBEJS_TESSERACT_SQL_PLANNER === 'true';
30+
2931
const fixtures = getFixtures(type, extendedEnv);
3032
let client: CubeApi;
3133
let driver: BaseDriver;
@@ -65,7 +67,9 @@ export function testQueries(type: string, { includeIncrementalSchemaSuite, exten
6567
}
6668

6769
function execute(name: string, test: () => Promise<void>) {
68-
if (fixtures.skip && fixtures.skip.indexOf(name) >= 0) {
70+
if (!isTesseractEnv && fixtures.skip && fixtures.skip.indexOf(name) >= 0) {
71+
it.skip(name, test);
72+
} else if (isTesseractEnv && fixtures.tesseractSkip && fixtures.tesseractSkip.indexOf(name) >= 0) {
6973
it.skip(name, test);
7074
} else {
7175
it(name, test);

packages/cubejs-testing-drivers/src/types/Fixture.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ export type Fixture = {
3131
[cube: string]: [{ name: string, [prop: string]: unknown }],
3232
},
3333
skip?: string[],
34+
tesseractSkip?: string[],
3435
};

0 commit comments

Comments
 (0)