Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

CI files are updated #225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile--ubuntu_24_04.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ RUN apt update
RUN apt install -y sudo curl ca-certificates
RUN apt update
RUN apt install -y openssh-server
RUN apt install -y time

RUN apt update
RUN apt install -y postgresql-common
Expand Down
27 changes: 9 additions & 18 deletions run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,17 @@ if [ -z ${TEST_FILTER+x} ]; \
then export TEST_FILTER="TestgresTests or (TestTestgresCommon and (not remote_ops))"; \
fi

# choose python version
echo python version is $PYTHON_VERSION
VIRTUALENV="virtualenv --python=/usr/bin/python$PYTHON_VERSION"
PIP="pip$PYTHON_VERSION"

# fail early
echo check that pg_config is in PATH
command -v pg_config

# prepare environment
VENV_PATH=/tmp/testgres_venv
# prepare python environment
VENV_PATH="/tmp/testgres_venv"
rm -rf $VENV_PATH
$VIRTUALENV $VENV_PATH
virtualenv --python="/usr/bin/python${PYTHON_VERSION}" "${VENV_PATH}"
export VIRTUAL_ENV_DISABLE_PROMPT=1
source $VENV_PATH/bin/activate

# install utilities
$PIP install coverage flake8 psutil Sphinx pytest pytest-xdist psycopg2 six psutil
source "${VENV_PATH}/bin/activate"
pip install coverage flake8 psutil Sphinx pytest pytest-xdist psycopg2 six psutil

# install testgres' dependencies
export PYTHONPATH=$(pwd)
Expand All @@ -45,15 +38,13 @@ time coverage run -a -m pytest -l -v -n 4 -k "${TEST_FILTER}"


# run tests (PG_BIN)
time \
PG_BIN=$(pg_config --bindir) \
coverage run -a -m pytest -l -v -n 4 -k "${TEST_FILTER}"
PG_BIN=$(pg_config --bindir) \
time coverage run -a -m pytest -l -v -n 4 -k "${TEST_FILTER}"


# run tests (PG_CONFIG)
time \
PG_CONFIG=$(pg_config --bindir)/pg_config \
coverage run -a -m pytest -l -v -n 4 -k "${TEST_FILTER}"
PG_CONFIG=$(pg_config --bindir)/pg_config \
time coverage run -a -m pytest -l -v -n 4 -k "${TEST_FILTER}"


# show coverage
Expand Down