Skip to content

Commit

Permalink
Switch to using python through a virtual env
Browse files Browse the repository at this point in the history
  • Loading branch information
Ngalstyan4 committed Jun 12, 2024
1 parent 545d701 commit d12390e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ jobs:
run: |
# pytest tries to open files with full path and so 'work' home folder must be listable by postgres for it to work
sudo chmod +x /home/runner && \
sudo su postgres -c "python3 ./scripts/integration_tests.py" &&\
sudo su postgres -c "python3 -m pytest ./scripts/integration_tests.py --rootdir=./scripts -c /dev/null" &&\
sudo su postgres -c "/tmp/lantern/cienv/bin/python ./scripts/integration_tests.py" &&\
echo "Done with integration tests"
env:
PG_VERSION: ${{ matrix.postgres }}
Expand All @@ -64,7 +63,7 @@ jobs:
run: |
# Start postgres
sudo su postgres -c "PG_VERSION=$PG_VERSION RUN_TESTS=0 ./ci/scripts/run-tests-linux.sh" && \
sudo su -c "PG_VERSION=$PG_VERSION python3 ./scripts/test_updates.py -U postgres" &&\
sudo su -c "PG_VERSION=$PG_VERSION /tmp/lantern/cienv/bin/python ./scripts/test_updates.py -U postgres" &&\
echo "Done with updates"
env:
PG_VERSION: ${{ matrix.postgres }}
Expand Down
4 changes: 3 additions & 1 deletion ci/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ function build_and_install() {
popd

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

mkdir build
cd build
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/run-tests-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function run_db_tests(){
make test && \
make test-parallel && \
make test-client && \
python3 ../scripts/test_wal.py && \
$WORKDIR/cienv/bin/python ../scripts/test_wal.py && \
run_pgvector_tests && \
stop_current_postgres && \
if [[ "$ENABLE_COVERAGE" == "1" ]]
Expand Down

0 comments on commit d12390e

Please sign in to comment.