Skip to content

Commit

Permalink
Run unit tests on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Minfante377 committed Aug 13, 2024
1 parent 5cce906 commit 349c9b6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ test-gcs:
sh ./dev/run-gcs-server.sh
poetry run pytest tests/ -m gcs ${PYTEST_ARGS}

test-coverage:
test-coverage-unit:
poetry run coverage run --source=pyiceberg/ -m pytest tests/ -m "(unmarked or parametrize) and not integration" ${PYTEST_ARGS}
poetry run coverage report -m --fail-under=80
poetry run coverage html
poetry run coverage xml

test-coverage-integration:
docker compose -f dev/docker-compose-integration.yml kill
docker compose -f dev/docker-compose-integration.yml rm -f
docker compose -f dev/docker-compose-integration.yml up -d
Expand All @@ -67,11 +73,13 @@ test-coverage:
sleep 10
docker compose -f dev/docker-compose-integration.yml cp ./dev/provision.py spark-iceberg:/opt/spark/provision.py
docker compose -f dev/docker-compose-integration.yml exec -T spark-iceberg ipython ./provision.py
poetry run coverage run --source=pyiceberg/ -m pytest tests/ ${PYTEST_ARGS}
poetry run coverage run --source=pyiceberg/ -m pytest tests/ -m integration ${PYTEST_ARGS}
poetry run coverage report -m --fail-under=90
poetry run coverage html
poetry run coverage xml

test-coverage: | test-coverage-unit test-coverage-integration


clean:
@echo "Cleaning up Cython and Python cached files"
Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_reads.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,7 @@ def test_configure_row_group_batch_size(session_catalog: Catalog) -> None:
assert len(batches) == entries


@pytest.mark.integration
@pytest.mark.parametrize("catalog", [pytest.lazy_fixture("session_catalog_hive"), pytest.lazy_fixture("session_catalog")])
def test_table_scan_default_to_large_types(catalog: Catalog) -> None:
identifier = "default.test_table_scan_default_to_large_types"
Expand Down

0 comments on commit 349c9b6

Please sign in to comment.