diff --git a/ci/build_docs.sh b/ci/build_docs.sh new file mode 100644 index 000000000..0dfd4e083 --- /dev/null +++ b/ci/build_docs.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +echo "################################################################################" +echo "Building docs..." +echo "################################################################################" +echo + +. $WORKSPACE/pgadmin-venv/bin/activate +$WORKSPACE/pgadmin-venv/bin/pip install Sphinx==1.4.9 +cd $WORKSPACE/ +make docs diff --git a/ci/build_runtime_qt4.sh b/ci/build_runtime_qt4.sh new file mode 100644 index 000000000..7f3134bda --- /dev/null +++ b/ci/build_runtime_qt4.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +echo "################################################################################" +echo "Building runtime - QT4..." +echo "################################################################################" +echo + +cd $WORKSPACE/runtime +make clean +PATH=/usr/local/python-$PYTHON_VERSION/bin:$PATH /bin/qmake-qt4 +make all diff --git a/ci/build_runtime_qt5.sh b/ci/build_runtime_qt5.sh new file mode 100644 index 000000000..ec505c237 --- /dev/null +++ b/ci/build_runtime_qt5.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +echo "################################################################################" +echo "Building runtime - QT5..." +echo "################################################################################" +echo + +make clean +cd $WORKSPACE/runtime +PATH=/usr/local/python-$PYTHON_VERSION/bin:$PATH /bin/qmake-qt5 DEFINES+=PGADMIN4_USE_WEBKIT +make all diff --git a/ci/create_config.sh b/ci/create_config.sh new file mode 100644 index 000000000..6ece7c2ae --- /dev/null +++ b/ci/create_config.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +echo "################################################################################" +echo "Creating pgAdmin configuration..." +echo "################################################################################" +echo + +cp $JENKINS_HOME/pgadmin-configs/config_local.py $WORKSPACE/web/config_local.py +echo LOG_FILE = \"$WORKSPACE/var/pgadmin4.log\" >> $WORKSPACE/web/config_local.py +echo SESSION_DB_PATH = \"$WORKSPACE/var/sessions\" >> $WORKSPACE/web/config_local.py +echo STORAGE_DIR = \"$WORKSPACE/var/storage\" >> $WORKSPACE/web/config_local.py +echo SQLITE_PATH = \"$WORKSPACE/var/pgadmin4.db\" >> $WORKSPACE/web/config_local.py +echo TEST_SQLITE_PATH = \"$WORKSPACE/var/pgadmin4.db\" >> $WORKSPACE/web/config_local.py + +cp $JENKINS_HOME/pgadmin-configs/test_config.json $WORKSPACE/web/regression/test_config.json diff --git a/ci/run_jasmine_tests.sh b/ci/run_jasmine_tests.sh new file mode 100644 index 000000000..ac334e631 --- /dev/null +++ b/ci/run_jasmine_tests.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +echo "################################################################################" +echo "Executing jasmine tests..." +echo "################################################################################" +echo + +cd $WORKSPACE/web/ +/bin/npm install +./node_modules/.bin/karma start --single-run diff --git a/ci/run_python_tests.sh b/ci/run_python_tests.sh new file mode 100644 index 000000000..540d29ce3 --- /dev/null +++ b/ci/run_python_tests.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +echo "################################################################################" +echo "Starting virtual frame buffer..." +echo "################################################################################" +echo + +Xvfb -ac :99 -screen 0 1280x1024x16 & +FB_PID=$! +export DISPLAY=:99 + +echo "################################################################################" +echo "Creating Python ${PYTHON_VERSION} virtual environment..." +echo "################################################################################" +echo + +/usr/bin/virtualenv -p /usr/local/python-$PYTHON_VERSION/bin/python $WORKSPACE/pgadmin-venv +. $WORKSPACE/pgadmin-venv/bin/activate +$WORKSPACE/pgadmin-venv/bin/pip install -r requirements.txt +$WORKSPACE/pgadmin-venv/bin/pip install -r web/regression/requirements.txt + +echo "################################################################################" +echo "Executing regression tests..." +echo "################################################################################" +echo + +$WORKSPACE/pgadmin-venv/bin/python $WORKSPACE/web/regression/runtests.py --exclude feature_tests + +echo "################################################################################" +echo "Cleaning up..." +echo "################################################################################" +echo + +kill $FB_PID