Skip to content

Commit fbdd834

Browse files
committed
refactor
1 parent 00942e5 commit fbdd834

2 files changed

Lines changed: 33 additions & 4 deletions

File tree

.github/workflows/python-ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,21 @@ jobs:
8484
- name: Show debug logs
8585
if: ${{ failure() }}
8686
run: docker compose -f dev/docker-compose.yml logs
87+
88+
object-store-integration-test:
89+
runs-on: ubuntu-22.04
90+
strategy:
91+
matrix:
92+
python: ['3.9', '3.10', '3.11', '3.12']
93+
94+
steps:
95+
- uses: actions/checkout@v4
96+
- name: Install system dependencies
97+
run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos
98+
- name: Install
99+
run: make install
100+
- name: Run object store integration tests
101+
run: make test-coverage-object-store-integration
102+
- name: Show debug logs
103+
if: ${{ failure() }}
104+
run: docker compose -f dev/docker-compose.yml logs

Makefile

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ install-poetry: # Ensure Poetry is installed and the correct version is being us
3737
install-dependencies: # Install dependencies including dev, docs, and all extras
3838
poetry install --all-extras
3939

40-
install: | install-poetry install-dependencies
40+
install: | install-poetry install-dependencies # Install poetry and all dependencies
4141

4242
check-license: # Check license headers
4343
./dev/check-license
@@ -66,6 +66,8 @@ test-integration-rebuild:
6666
docker compose -f dev/docker-compose-integration.yml rm -f
6767
docker compose -f dev/docker-compose-integration.yml build --no-cache
6868

69+
test-object-store-integration: test-s3 test-adls test-gcs # Run object stores integration tests, can add arguments with PYTEST_ARGS="-vv"
70+
6971
test-s3: # Run tests marked with s3, can add arguments with PYTEST_ARGS="-vv"
7072
sh ./dev/run-minio.sh
7173
poetry run pytest tests/ -m s3 ${PYTEST_ARGS}
@@ -81,17 +83,26 @@ test-gcs: # Run tests marked with gcs, can add arguments with PYTEST_ARGS="-vv"
8183
test-coverage-unit: # Run test with coverage for unit tests, can add arguments with PYTEST_ARGS="-vv"
8284
poetry run coverage run --source=pyiceberg/ --data-file=.coverage.unit -m pytest tests/ -v -m "(unmarked or parametrize) and not integration" ${PYTEST_ARGS}
8385

84-
test-coverage-integration: test-integration-setup # Run test with coverage for integration tests, can add arguments with PYTEST_ARGS="-vv"
86+
test-coverage-integration: test-integration-setup test-object-store-integration # Run test with coverage for integration tests, can add arguments with PYTEST_ARGS="-vv"
8587
docker compose -f dev/docker-compose-integration.yml exec -T spark-iceberg ipython ./provision.py
8688
poetry run coverage run --source=pyiceberg/ --data-file=.coverage.integration -m pytest tests/ -v -m integration ${PYTEST_ARGS}
8789

88-
test-coverage: | test-coverage-unit test-coverage-integration test-s3 test-adls test-gcs # Run all tests with coverage including unit and integration tests
90+
test-coverage-object-store-integration: # Run test with coverage for object stores integration tests, can add arguments with PYTEST_ARGS="-vv"
91+
sh ./dev/run-minio.sh
92+
poetry run coverage run --source=pyiceberg/ --data-file=.coverage.integration -m pytest tests/ -m s3 ${PYTEST_ARGS}
93+
94+
sh ./dev/run-azurite.sh
95+
poetry run coverage run --source=pyiceberg/ --data-file=.coverage.integration -m pytest tests/ -m adls ${PYTEST_ARGS}
96+
97+
sh ./dev/run-gcs-server.sh
98+
poetry run coverage run --source=pyiceberg/ --data-file=.coverage.integration -m pytest tests/ -m gcs ${PYTEST_ARGS}
99+
100+
test-coverage: | test-coverage-unit test-coverage-integration test-coverage-object-store-integration # Run all tests with coverage including unit and integration tests
89101
poetry run coverage combine .coverage.unit .coverage.integration
90102
poetry run coverage report -m --fail-under=90
91103
poetry run coverage html
92104
poetry run coverage xml
93105

94-
95106
clean: # Clean up the project Python working environment
96107
@echo "Cleaning up Cython and Python cached files"
97108
@rm -rf build dist *.egg-info

0 commit comments

Comments
 (0)