diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index ff3368acb3db3..28310e2e146e4 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,5 +1,5 @@ **Check List** -- [ ] Tests has been run in packages where changes made if available +- [ ] Tests have been run in packages where changes made if available - [ ] Linter has been run for changed code - [ ] Tests for the changes have been added if not covered yet - [ ] Docs have been added / updated if required diff --git a/packages/cubejs-schema-compiler/test/integration/clickhouse/custom-granularities.test.ts b/packages/cubejs-schema-compiler/test/integration/clickhouse/custom-granularities.test.ts index 966ba6846e6e4..2d8a1665d66b6 100644 --- a/packages/cubejs-schema-compiler/test/integration/clickhouse/custom-granularities.test.ts +++ b/packages/cubejs-schema-compiler/test/integration/clickhouse/custom-granularities.test.ts @@ -41,9 +41,11 @@ describe('Custom Granularities', () => { granularities: - name: half_year interval: 6 months + origin: '2024-01-01' # to keep tests stable across time (year change, etc) - name: half_year_by_1st_april interval: 6 months - offset: 3 months + #offset: 3 months + origin: '2024-04-01' # to keep tests stable across time (year change, etc) - name: two_weeks_by_friday interval: 2 weeks origin: '2024-08-23' diff --git a/packages/cubejs-schema-compiler/test/integration/mssql/custom-granularities.test.ts b/packages/cubejs-schema-compiler/test/integration/mssql/custom-granularities.test.ts index 762e88230af76..922b37e48b80a 100644 --- a/packages/cubejs-schema-compiler/test/integration/mssql/custom-granularities.test.ts +++ b/packages/cubejs-schema-compiler/test/integration/mssql/custom-granularities.test.ts @@ -37,9 +37,11 @@ describe('Custom Granularities', () => { granularities: - name: half_year interval: 6 months + origin: '2024-01-01' # to keep tests stable across time (year change, etc) - name: half_year_by_1st_april interval: 6 months - offset: 3 months + #offset: 3 months + origin: '2024-04-01' # to keep tests stable across time (year change, etc) - name: two_weeks_by_friday interval: 2 weeks origin: '2024-08-23' diff --git a/packages/cubejs-schema-compiler/test/integration/mysql/custom-granularities.test.ts b/packages/cubejs-schema-compiler/test/integration/mysql/custom-granularities.test.ts index a69c9a97c527e..1505442c453b0 100644 --- a/packages/cubejs-schema-compiler/test/integration/mysql/custom-granularities.test.ts +++ b/packages/cubejs-schema-compiler/test/integration/mysql/custom-granularities.test.ts @@ -37,9 +37,11 @@ describe('Custom Granularities', () => { granularities: - name: half_year interval: 6 months + origin: '2024-01-01' # to keep tests stable across time (year change, etc) - name: half_year_by_1st_april interval: 6 months - offset: 3 months + #offset: 3 months + origin: '2024-04-01' # to keep tests stable across time (year change, etc) - name: two_weeks_by_friday interval: 2 weeks origin: '2024-08-23' diff --git a/packages/cubejs-schema-compiler/test/integration/postgres/custom-granularities.test.ts b/packages/cubejs-schema-compiler/test/integration/postgres/custom-granularities.test.ts index 4d6314a9089e1..4be8f26f744b7 100644 --- a/packages/cubejs-schema-compiler/test/integration/postgres/custom-granularities.test.ts +++ b/packages/cubejs-schema-compiler/test/integration/postgres/custom-granularities.test.ts @@ -39,9 +39,11 @@ describe('Custom Granularities', () => { granularities: - name: half_year interval: 6 months + origin: '2024-01-01' # to keep tests stable across time (year change, etc) - name: half_year_by_1st_april interval: 6 months - offset: 3 months + #offset: 3 months + origin: '2024-04-01' # to keep tests stable across time (year change, etc) - name: two_weeks_by_friday interval: 2 weeks origin: '2024-08-23' diff --git a/packages/cubejs-testing-drivers/fixtures/_schemas.json b/packages/cubejs-testing-drivers/fixtures/_schemas.json index bfd9e256a1c0c..79339640180f4 100644 --- a/packages/cubejs-testing-drivers/fixtures/_schemas.json +++ b/packages/cubejs-testing-drivers/fixtures/_schemas.json @@ -92,12 +92,13 @@ "granularities": [ { "name": "half_year", - "interval": "6 months" + "interval": "6 months", + "origin": "2024-01-01" }, { "name": "half_year_by_1st_april", "interval": "6 months", - "offset": "3 months" + "origin": "2024-04-01" }, { "name": "two_mo_by_feb", @@ -118,12 +119,13 @@ "granularities": [ { "name": "half_year", - "interval": "6 months" + "interval": "6 months", + "origin": "2024-01-01" }, { "name": "half_year_by_1st_april", "interval": "6 months", - "offset": "3 months" + "origin": "2024-04-01" }, { "name": "two_mo_by_feb",