Skip to content

Commit

Permalink
ci: use uv for python cross-version testing
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Koo <[email protected]>
  • Loading branch information
rkoo19 committed Feb 6, 2025
1 parent 084adce commit c348bb8
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 5 deletions.
37 changes: 33 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,18 +203,47 @@ test:short:python-changelog-check:
- echo "$CHANGED_FILES"
- echo "$CHANGED_FILES" | grep -qx 'python/CHANGELOG.md' || exit 1

test:short:python-unit:
<<: *test_short_def
variables:
PIP: "uv pip"
script:
- cd python
- |
set -e
for ver in 3.8 3.9 3.10 3.11 3.12 3.13; do
uv venv --python "$ver" .venv
source .venv/bin/activate
make python_sdk_unit_tests
make python_botocore_unit_tests
deactivate || true
rm -rf .venv
done
except:
variables:
- $CI_MERGE_REQUEST_LABELS =~ /.*skip-ci.*/

# Runs cluster with 5 proxies and 5 targets (each with 6 mountpaths).
test:short:python:
test:short:python-integration:
<<: *test_short_def
variables:
AIS_ENDPOINT: "http://localhost:8080"
BUCKET: "aws://ais-ci-python"
PIP: "uv pip"
script:
- ${SCRIPTS_DIR}/clean_deploy.sh --target-cnt $NUM_TARGET --proxy-cnt $NUM_PROXY --mountpath-cnt $FS_CNT --deployment all --aws
- cd python
- make python_sdk_tests
- make python_botocore_tests

- |
set -e
for ver in 3.8 3.9 3.10 3.11 3.12 3.13; do
uv venv --python "$ver" .venv
source .venv/bin/activate
make python_botocore_integration_tests
# TODO: For now, only run full SDK integration on 3.13
if [ "$ver" = "3.13" ]; then make python_sdk_integration_tests; fi
deactivate || true
rm -rf .venv
done
except:
variables:
- $CI_MERGE_REQUEST_LABELS =~ /.*skip-ci.*/
Expand Down
2 changes: 1 addition & 1 deletion python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SHELL := /bin/bash
PYTHON = python3
GO = go
PYTEST = $(PYTHON) -m pytest
PIP = pip3
PIP ?= pip3
SDK_DOCFILE := ../docs/python_sdk.md
TORCH_DOCFILE := ../docs/pytorch.md
PYAISLOADER_TEST_TYPE ?= short
Expand Down
1 change: 1 addition & 0 deletions python/aistore/botocore_patch/botocore_requirements
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ boto3
botocore
moto==4.0.11
wrapt==1.14.1
pytest==7.4.4
pytest-xdist==3.1.0

0 comments on commit c348bb8

Please sign in to comment.