mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Test CI
This commit is contained in:
parent
bcdddc2c1c
commit
4d5c88f5f1
2
.github/workflows/github_ci_php71_pgsql.yml
vendored
2
.github/workflows/github_ci_php71_pgsql.yml
vendored
|
|
@ -118,7 +118,7 @@ jobs:
|
|||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SHOW DATABASES"
|
||||
echo "Drop and create database"
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'DROP DATABASE IF EXISTS travis;'
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8';'
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8';"
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password';"
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'FLUSH PRIVILEGES;'
|
||||
|
|
|
|||
2
.github/workflows/github_ci_php81_mysql.yml
vendored
2
.github/workflows/github_ci_php81_mysql.yml
vendored
|
|
@ -96,7 +96,7 @@ jobs:
|
|||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SHOW DATABASES"
|
||||
echo "Drop and create database"
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'DROP DATABASE IF EXISTS travis;'
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8';'
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8';"
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password';"
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'FLUSH PRIVILEGES;'
|
||||
|
|
|
|||
14
.travis.yml
14
.travis.yml
|
|
@ -224,11 +224,15 @@ before_script:
|
|||
- |
|
||||
echo "Setting up database"
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then
|
||||
echo "MySQL"
|
||||
echo "MySQL drop database"
|
||||
mysql -u root -e 'DROP DATABASE IF EXISTS travis;'
|
||||
mysql -u root -e 'CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8';'
|
||||
echo "MySQL create database"
|
||||
mysql -u root -e "CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8';"
|
||||
echo "MySQL create user"
|
||||
mysql -u root -e "CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password';"
|
||||
echo "MySQL grant"
|
||||
mysql -u root -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
|
||||
echo "MySQL flush"
|
||||
mysql -u root -e 'FLUSH PRIVILEGES;'
|
||||
mysql -u root -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
fi
|
||||
|
|
@ -237,10 +241,10 @@ before_script:
|
|||
sudo mkdir -p /tmp/pgloader
|
||||
sudo chmod -R a+rwx /tmp/pgloader/
|
||||
sudo pgloader mysql://root@127.0.0.1/travis postgresql://postgres:postgres@127.0.0.1:5432/travis
|
||||
echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql ''postgresql://postgres:postgres@127.0.0.1:5432/travis''
|
||||
echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql ''postgresql://postgres:postgres@127.0.0.1:5432/travis''
|
||||
echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
# Create pgsql compatibility functions
|
||||
psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'' < htdocs/install/pgsql/functions/functions.sql
|
||||
psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis' < htdocs/install/pgsql/functions/functions.sql
|
||||
fi
|
||||
echo
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user