From 712a276427dc0fdb327232a2e62e7575acc0e97c Mon Sep 17 00:00:00 2001 From: Paris Morgan Date: Tue, 15 Oct 2024 16:49:52 -0700 Subject: [PATCH] Update CI to also run python tests w ith numpy 1 --- .github/workflows/ci-python.yml | 54 +++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.yml index 95e806580..b6313a848 100644 --- a/.github/workflows/ci-python.yml +++ b/.github/workflows/ci-python.yml @@ -13,6 +13,7 @@ jobs: os: [ubuntu-latest] python-version: ["3.9"] runs-on: ${{ matrix.os }} + continue-on-error: true steps: - name: Install OpenBLAS run: sudo apt install libopenblas-dev @@ -29,6 +30,59 @@ jobs: - name: Build and test python run: | pip install .[test] + + pip list + + cd apis/python + pytest -n logical --durations=0 + # TODO: fix editable on linux + #pip uninstall -y tiledb.vector_search + #pip install -e . + #pytest + pip install -r test/ipynb/requirements.txt + export TILEDB_REST_TOKEN=$TILEDB_CLOUD_HELPER_VAR + pytest -n logical --durations=0 --nbmake test/ipynb + env: + TILEDB_CLOUD_HELPER_VAR: ${{ secrets.TILEDB_CLOUD_HELPER_VAR }} + shell: bash -el {0} + - name: Check tiledb-vector-search version + run: | + python -c "from tiledb.vector_search.version import version; print(version)" + + # This is a temporary job where we will build with numpy2, but run with numpy1. + run-tests-numpy-1: + strategy: + matrix: + os: [ubuntu-latest] + python-version: ["3.9"] + runs-on: ${{ matrix.os }} + continue-on-error: true + steps: + - name: Install OpenBLAS + run: sudo apt install libopenblas-dev + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Print Python version + run: | + which python + which pip + python --version + - name: Build and test python + run: | + # This will build with numpy 2. + pip install .[test] + + pip list + + # Then we will uninstall numpy 2 and install numpy 1. + pip uninstall -y numpy + pip install numpy==1.25.0 + + pip list + cd apis/python pytest -n logical --durations=0 # TODO: fix editable on linux