[ci] sqlite3 is installed by default, and show versions first
This commit is contained in:
parent
4cc9b2f5d3
commit
82b8991fa4
1 changed files with 2 additions and 3 deletions
|
@ -7,22 +7,21 @@ DATABASE=$1
|
||||||
mkdir -p data/config
|
mkdir -p data/config
|
||||||
|
|
||||||
if [ "$DATABASE" = "pgsql" ]; then
|
if [ "$DATABASE" = "pgsql" ]; then
|
||||||
sudo systemctl start postgresql
|
|
||||||
psql --version
|
psql --version
|
||||||
|
sudo systemctl start postgresql
|
||||||
sudo -u postgres psql -c "SELECT set_config('log_statement', 'all', false);" -U postgres
|
sudo -u postgres psql -c "SELECT set_config('log_statement', 'all', false);" -U postgres
|
||||||
sudo -u postgres psql -c "CREATE USER shimmie WITH PASSWORD 'shimmie';" -U postgres
|
sudo -u postgres psql -c "CREATE USER shimmie WITH PASSWORD 'shimmie';" -U postgres
|
||||||
sudo -u postgres psql -c "CREATE DATABASE shimmie WITH OWNER shimmie;" -U postgres
|
sudo -u postgres psql -c "CREATE DATABASE shimmie WITH OWNER shimmie;" -U postgres
|
||||||
export TEST_DSN="pgsql:user=shimmie;password=shimmie;host=127.0.0.1;dbname=shimmie"
|
export TEST_DSN="pgsql:user=shimmie;password=shimmie;host=127.0.0.1;dbname=shimmie"
|
||||||
fi
|
fi
|
||||||
if [ "$DATABASE" = "mysql" ]; then
|
if [ "$DATABASE" = "mysql" ]; then
|
||||||
sudo systemctl start mysql
|
|
||||||
mysql --version
|
mysql --version
|
||||||
|
sudo systemctl start mysql
|
||||||
mysql -e "SET GLOBAL general_log = 'ON';" -uroot -proot
|
mysql -e "SET GLOBAL general_log = 'ON';" -uroot -proot
|
||||||
mysql -e "CREATE DATABASE shimmie;" -uroot -proot
|
mysql -e "CREATE DATABASE shimmie;" -uroot -proot
|
||||||
export TEST_DSN="mysql:user=root;password=root;host=127.0.0.1;dbname=shimmie"
|
export TEST_DSN="mysql:user=root;password=root;host=127.0.0.1;dbname=shimmie"
|
||||||
fi
|
fi
|
||||||
if [ "$DATABASE" = "sqlite" ]; then
|
if [ "$DATABASE" = "sqlite" ]; then
|
||||||
sudo apt update && sudo apt-get install -y sqlite3
|
|
||||||
sqlite3 --version
|
sqlite3 --version
|
||||||
export TEST_DSN="sqlite:data/shimmie.sqlite"
|
export TEST_DSN="sqlite:data/shimmie.sqlite"
|
||||||
fi
|
fi
|
||||||
|
|
Reference in a new issue