Skip to content

Commit

Permalink
Add Trino engine test config to SQL Engine Tests action
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tlento committed Dec 19, 2023
1 parent d1fcc62 commit bb739f5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/cd-sql-engine-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bb739f5

Please sign in to comment.