From bb739f5a641eb5ada9da02b2396a7034269ca3e3 Mon Sep 17 00:00:00 2001 From: tlento Date: Mon, 18 Dec 2023 18:52:31 -0800 Subject: [PATCH] Add Trino engine test config to SQL Engine Tests action This adds a Trino test job to the MetricFlow SQL Engine Tests action. Trino can run its tests in a service container without need for an external environment, however, the service container execution for these tests is materially slower in CI runs than Postgres. Rather than delay PR-blocking unit test completion we put the Trino test suite execution in the label-initiated SQL Engine test action. This allows us to move Trino to cloud-hosted execution, if we should care to do so, but for the time being we will stick with the in-memory service container. --- .github/workflows/cd-sql-engine-tests.yaml | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/cd-sql-engine-tests.yaml b/.github/workflows/cd-sql-engine-tests.yaml index 41923d54b9..c509cea11e 100644 --- a/.github/workflows/cd-sql-engine-tests.yaml +++ b/.github/workflows/cd-sql-engine-tests.yaml @@ -91,6 +91,29 @@ jobs: additional-pytest-options: ${{ env.ADDITIONAL_PYTEST_OPTIONS }} make-target: "test-databricks" + trino-tests: + # Trino tests run on a local service container, which obviates the need for separate Environment hosting. + # We run them here instead of in the CI unit test suite because they are a bit slower, and because in future + # we may choose to execute them against a hosted instance, at which point this config will look like the other + # engine configs in this file. + name: Trino Tests + if: ${{ github.event.action != 'labeled' || github.event.label.name == 'Run Tests With Other SQL Engines' }} + runs-on: ubuntu-latest + services: + trino: + image: trinodb/trino + ports: + - 8080:8080 + steps: + - name: Check-out the repo + uses: actions/checkout@v3 + + - name: Test w/ Python 3.11 + uses: ./.github/actions/run-mf-tests + with: + python-version: "3.11" + make-target: "test-trino" + remove-label: name: Remove Label After Running Tests runs-on: ubuntu-latest