Skip to content

Commit 72fa3c6

Browse files
committed
add trino to ci job and fix make test problem
1 parent 774ec5f commit 72fa3c6

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

.github/workflows/python-ci.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,36 @@ jobs:
178178
path: .coverage*
179179
include-hidden-files: true
180180

181+
integration-test-trino:
182+
runs-on: ubuntu-latest
183+
steps:
184+
- uses: actions/checkout@v6
185+
- uses: actions/setup-python@v6
186+
with:
187+
python-version: '3.12'
188+
- name: Install UV
189+
uses: astral-sh/setup-uv@v7
190+
with:
191+
enable-cache: true
192+
- name: Install system dependencies
193+
run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos
194+
- name: Install
195+
run: make install
196+
- name: Run trino integration tests with coverage
197+
run: COVERAGE=1 make test-trino
198+
- name: Show debug logs
199+
if: ${{ failure() }}
200+
run: docker compose -f dev/docker-compose-trino.yml logs
201+
- name: Upload coverage data
202+
uses: actions/upload-artifact@v4
203+
with:
204+
name: coverage-trino
205+
path: .coverage*
206+
include-hidden-files: true
207+
181208
integration-coverage-report:
182209
runs-on: ubuntu-latest
183-
needs: [integration-test, integration-test-s3, integration-test-adls, integration-test-gcs]
210+
needs: [integration-test, integration-test-s3, integration-test-adls, integration-test-gcs, integration-test-trino]
184211
steps:
185212
- uses: actions/checkout@v6
186213
- uses: actions/setup-python@v6

tests/integration/test_trino.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
import pyarrow as pa
2222
import pytest
23-
from sqlalchemy import Connection, inspect, text
23+
from sqlalchemy import Connection, text
2424

2525
from pyiceberg.catalog import Catalog
2626
from pyiceberg.catalog.rest import RestCatalog
@@ -47,10 +47,10 @@ def test_schema_exists_in_trino(trino_rest_conn: Connection, catalog: RestCatalo
4747
catalog.create_namespace_if_not_exists(TEST_NAMESPACE_IDENTIFIER)
4848

4949
assert catalog.namespace_exists(TEST_NAMESPACE_IDENTIFIER)
50-
assert TEST_NAMESPACE_IDENTIFIER[0].lower() in inspect(trino_rest_conn).get_schema_names()
5150

5251

5352
@pytest.mark.trino
53+
@pytest.mark.integration
5454
@pytest.mark.parametrize(
5555
"transform",
5656
[

tests/integration/test_writes/test_writes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2148,6 +2148,7 @@ def test_uuid_partitioning(session_catalog: Catalog, spark: SparkSession, transf
21482148
assert lhs == rhs
21492149

21502150

2151+
@pytest.mark.integration
21512152
def test_avro_compression_codecs(session_catalog: Catalog, arrow_table_with_null: pa.Table) -> None:
21522153
identifier = "default.test_avro_compression_codecs"
21532154
tbl = _create_table(session_catalog, identifier, schema=arrow_table_with_null.schema, data=[arrow_table_with_null])

0 commit comments

Comments
 (0)