Skip to content
Snippets Groups Projects

Add benchmark tests for CI

Merged Krzysztof Mochocki requested to merge kmochocki/ci_benchmarks into develop
Files
8
#! /bin/bash
set -euo pipefail
set -euo pipefail
SCRIPTDIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
@@ -8,7 +8,7 @@ cleanup () {
echo "Performing cleanup...."
python_pid=$(pidof 'python3')
echo "python_pid: $python_pid"
kill -INT $python_pid
echo "Waiting for hafah finish..."
@@ -34,6 +34,13 @@ done
pushd /home/hafah_user/app
# credits: https://stackoverflow.com/a/39028690/11738218
RETRIES=12
until psql ${POSTGRES_URL} -c "SELECT 1" > /dev/null 2>&1 || [ $RETRIES -eq 0 ]; do
echo "Waiting for postgres server, $((RETRIES--)) remaining attempts..."
sleep 10
done
./scripts/setup_postgres.sh --postgres-url=${POSTGRES_URL}
./scripts/setup_db.sh --postgres-url=${POSTGRES_URL}
Loading