This commit is contained in:
Laurent Destailleur 2023-06-26 19:47:42 +02:00
parent 6cb360449c
commit 3def672712

View File

@ -20,29 +20,12 @@ services:
addons:
mariadb: '10.4'
# Force postgresql version
#postgresql: '10'
#apt:
#sources:
#- sourceline: 'ppa:ondrej/php'
#update: true
#packages:
# We need a webserver to test the webservices
# Let's install Apache with.
#- apache2
# We need pgloader for import mysql database into pgsql
#- pgloader
#- php8.1
#- php8.1-pgsql
#- php8.1-mysqli
#- php8.1-xml
#- php8.1-intl
env:
global:
# Set to true for very verbose output
- DEBUG=false
#- PGPORT=5433
jobs:
fast_finish: true
@ -232,12 +215,6 @@ before_script:
sudo mysqld_safe --skip-grant-tables --socket=/tmp/aaa &
sleep 3
sudo ps fauxww
#echo "MySQL flush"
#sudo mysql -u root -h 127.0.0.1 -e 'FLUSH PRIVILEGES;'
#echo "MySQL drop database"
#sudo mysql -u root -h 127.0.0.1 -e 'DROP DATABASE IF EXISTS travis;'
#echo "MySQL create database"
#sudo mysql -u root -h 127.0.0.1 -e "CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8';"
echo "MySQL set root password"
sudo mysql -u root -h 127.0.0.1 -e "FLUSH PRIVILEGES; CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8'; ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'; CREATE USER 'root'@'127.0.0.1' IDENTIFIED BY 'password'; CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON travis.* TO root@127.0.0.1; GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1; FLUSH PRIVILEGES;"
echo "MySQL grant"
@ -302,7 +279,7 @@ before_script:
- |
echo "Create documents directory and set permissions"
# and admin/temp subdirectory needed for unit tests
# Add admin/temp subdirectory needed for unit tests
mkdir -p $TRAVIS_BUILD_DIR/documents/admin/temp
sudo chmod -R a+rwx $TRAVIS_BUILD_DIR/documents
echo "***** First line of dolibarr.log" > $TRAVIS_BUILD_DIR/documents/dolibarr.log
@ -393,22 +370,6 @@ script:
echo '$'force_install_main_data_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $INSTALL_FORCED_FILE
#cat $INSTALL_FORCED_FILE
#- |
# echo "Installing Dolibarr"
# cd htdocs/install
# php step1.php $TRAVIS_BUILD_DIR/htdocs > $TRAVIS_BUILD_DIR/install.log
# php step2.php set >> $TRAVIS_BUILD_DIR/install.log
# if [ "$?" -ne "0" ]; then
# echo "SORRY, AN ERROR OCCURED DURING INSTALLATION PROCESS"
# cat $TRAVIS_BUILD_DIR/install.log
# exit 1
# fi
# cd ../..
# rm $INSTALL_FORCED_FILE
# #cat $TRAVIS_BUILD_DIR/install.log
# set +e
# echo
- |
echo "Upgrading Dolibarr"
# Ensure we catch errors. Set this to +e if you want to go to the end to see log files.
@ -481,7 +442,7 @@ script:
ls -alrt $TRAVIS_BUILD_DIR/
echo Show content of last file
cat "$(ls -rt $TRAVIS_BUILD_DIR/ | tail -n1)"
cat $TRAVIS_BUILD_DIR/"$(ls -rt $TRAVIS_BUILD_DIR/ | tail -n1)"
- |
echo "Enabling new modules"