From 9b9c99d5782a4f4902adcebc2b5e83a12fa6276f Mon Sep 17 00:00:00 2001 From: Emin UZUN Date: Tue, 19 Dec 2023 16:51:44 +0300 Subject: [PATCH] Add Trino support for integration tests --- .github/workflows/ci_test_package.yml | 14 +++++++++-- .github/workflows/main_test_package.yml | 7 +++++- README.md | 1 + integration_test_project/profiles.yml | 2 +- tox.ini | 31 +++++++++++++++++++++++++ 5 files changed, 51 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_test_package.yml b/.github/workflows/ci_test_package.yml index 034a316f..f6fc13a8 100644 --- a/.github/workflows/ci_test_package.yml +++ b/.github/workflows/ci_test_package.yml @@ -37,7 +37,7 @@ jobs: strategy: fail-fast: false # Don't fail one DWH if the others fail matrix: - warehouse: ["snowflake", "bigquery", "postgres"] + warehouse: ["snowflake", "bigquery", "postgres", "trino"] runs-on: ubuntu-latest environment: name: Approve Integration Tests @@ -58,6 +58,11 @@ jobs: ports: - 5432:5432 + trino: + image: trinodb/trino + ports: + - 8080:8080 + steps: - name: Get latest release uses: rez0n/actions-github-release@main @@ -113,7 +118,7 @@ jobs: strategy: fail-fast: false # Don't fail one DWH if the others fail matrix: - warehouse: ["snowflake", "bigquery", "postgres"] + warehouse: ["snowflake", "bigquery", "postgres", "trino"] # When supporting a new version, update the list here version: ["1_3_0", "1_4_0", "1_5_0", "1_6_0", "1_7_0"] runs-on: ubuntu-latest @@ -136,6 +141,11 @@ jobs: ports: - 5432:5432 + trino: + image: trinodb/trino + ports: + - 8080:8080 + steps: - uses: actions/setup-python@v4 with: diff --git a/.github/workflows/main_test_package.yml b/.github/workflows/main_test_package.yml index c8e503b5..4341e074 100644 --- a/.github/workflows/main_test_package.yml +++ b/.github/workflows/main_test_package.yml @@ -34,7 +34,7 @@ jobs: integration: strategy: matrix: - warehouse: ["snowflake", "bigquery", "postgres"] + warehouse: ["snowflake", "bigquery", "postgres", "trino"] version: ["1_3_0", "1_4_0", "1_5_0", "1_6_0", "1_7_0"] runs-on: ubuntu-latest permissions: @@ -54,6 +54,11 @@ jobs: ports: - 5432:5432 + trino: + image: trinodb/trino + ports: + - 8080:8080 + steps: - name: Checkout uses: actions/checkout@v3 diff --git a/README.md b/README.md index 6350d743..9027d61c 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ The package currently supports - Snowflake :white_check_mark: - Google BigQuery :white_check_mark: - Postgres :white_check_mark: +- Trino :white_check_mark: Models included: diff --git a/integration_test_project/profiles.yml b/integration_test_project/profiles.yml index f277587f..7786ab0d 100644 --- a/integration_test_project/profiles.yml +++ b/integration_test_project/profiles.yml @@ -60,5 +60,5 @@ dbt_artifacts: host: localhost database: datalake schema: dbt - port: 8181 + port: 8080 threads: 8 \ No newline at end of file diff --git a/tox.ini b/tox.ini index 60bc1d7d..bccf7121 100644 --- a/tox.ini +++ b/tox.ini @@ -332,6 +332,37 @@ commands = dbt deps dbt build --target trino +[testenv:integration_trino_1_3_0] +changedir = integration_test_project +deps = dbt-trino~=1.3.0 +commands = + dbt clean + dbt deps + dbt build --target trino + +[testenv:integration_trino_1_4_0] +changedir = integration_test_project +deps = dbt-trino~=1.4.0 +commands = + dbt clean + dbt deps + dbt build --target trino + +[testenv:integration_trino_1_5_0] +changedir = integration_test_project +deps = dbt-trino~=1.5.0 +commands = + dbt clean + dbt deps + dbt build --target trino + +[testenv:integration_trino_1_6_0] +changedir = integration_test_project +deps = dbt-trino~=1.6.0 +commands = + dbt clean + dbt deps + dbt build --target trino [testenv:integration_trino_1_7_0] changedir = integration_test_project