Skip to content

Commit d12390e

Browse files
committed
Switch to using python through a virtual env
1 parent 545d701 commit d12390e

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.github/workflows/test.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ jobs:
5454
run: |
5555
# pytest tries to open files with full path and so 'work' home folder must be listable by postgres for it to work
5656
sudo chmod +x /home/runner && \
57-
sudo su postgres -c "python3 ./scripts/integration_tests.py" &&\
58-
sudo su postgres -c "python3 -m pytest ./scripts/integration_tests.py --rootdir=./scripts -c /dev/null" &&\
57+
sudo su postgres -c "/tmp/lantern/cienv/bin/python ./scripts/integration_tests.py" &&\
5958
echo "Done with integration tests"
6059
env:
6160
PG_VERSION: ${{ matrix.postgres }}
@@ -64,7 +63,7 @@ jobs:
6463
run: |
6564
# Start postgres
6665
sudo su postgres -c "PG_VERSION=$PG_VERSION RUN_TESTS=0 ./ci/scripts/run-tests-linux.sh" && \
67-
sudo su -c "PG_VERSION=$PG_VERSION python3 ./scripts/test_updates.py -U postgres" &&\
66+
sudo su -c "PG_VERSION=$PG_VERSION /tmp/lantern/cienv/bin/python ./scripts/test_updates.py -U postgres" &&\
6867
echo "Done with updates"
6968
env:
7069
PG_VERSION: ${{ matrix.postgres }}

ci/scripts/build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ function build_and_install() {
6464
popd
6565

6666
# install update and WAL test dependencies
67-
sudo pip install -r /tmp/lantern/scripts/requirements.txt
67+
python3 -m venv cienv
68+
source cienv/bin/activate
69+
pip install -r /tmp/lantern/scripts/requirements.txt
6870

6971
mkdir build
7072
cd build

ci/scripts/run-tests-linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function run_db_tests(){
5353
make test && \
5454
make test-parallel && \
5555
make test-client && \
56-
python3 ../scripts/test_wal.py && \
56+
$WORKDIR/cienv/bin/python ../scripts/test_wal.py && \
5757
run_pgvector_tests && \
5858
stop_current_postgres && \
5959
if [[ "$ENABLE_COVERAGE" == "1" ]]

0 commit comments

Comments
 (0)