forked from Dolibarr/dolibarr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into related_v18_Updating_Invoice_Notes_32134
- Loading branch information
Showing
1,284 changed files
with
92,341 additions
and
30,240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ languages: | |
engines: | ||
phpcodesniffer: true | ||
exclude_paths: | ||
- 'build/*' | ||
- 'dev/*' | ||
- 'doc/*' | ||
- 'test/*' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Add this tag for any changes for more than 1 line | ||
"Pending analysis of PR (maintenance team)": | ||
min: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,14 +35,14 @@ jobs: | |
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
- 5432:5432 | ||
|
||
steps: | ||
# git clone dolibarr into GITHUB_WORKSPACE = /home/runner/work/dolibarr/dolibarr | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Version PHP | ||
run: | | ||
php -i | head - | ||
|
@@ -59,7 +59,7 @@ jobs: | |
sudo apt install apache2 php7.1 php7.1-cli php7.1-curl php7.1-mysql php7.1-pgsql php7.1-gd php7.1-imap php7.1-intl php7.1-ldap php7.1-xml php7.1-mbstring php7.1-xml php7.1-zip libapache2-mod-php7.1 | ||
sudo update-alternatives --set php /usr/bin/php7.1 | ||
php -i | head - | ||
|
||
cd $GITHUB_WORKSPACE | ||
ls $GITHUB_WORKSPACE | ||
composer -n require --ignore-platform-reqs phpunit/phpunit ^7.5 \ | ||
|
@@ -76,7 +76,7 @@ jobs: | |
sudo rm -fr htdocs/includes/phpunit/php-code-coverage/src/Report/Html | ||
|
||
- name: Adding path of binaries tools installed by composer to the PATH | ||
run: | | ||
run: | | ||
export PATH="$GITHUB_WORKSPACE/htdocs/includes/bin:$PATH" | ||
echo $PATH | ||
# We must have a directory bin created by the previous composer call | ||
|
@@ -107,32 +107,32 @@ jobs: | |
psql --version | ||
echo "Check pgloader version" | ||
pgloader --version | ||
|
||
- name: Create database | ||
run: | | ||
pwd | ||
echo GITHUB_WORKSPACE = $GITHUB_WORKSPACE | ||
echo GITHUB_WORKSPACE = $GITHUB_WORKSPACE | ||
sudo apt-get install -y mysql-client | ||
mysql --version | head - | ||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SELECT VERSION();" | head - | ||
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 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 [email protected];' | ||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'FLUSH PRIVILEGES;' | ||
|
||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql | ||
|
||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis -e "UPDATE llx_const set value = '0666' WHERE name = 'MAIN_UMASK';" | ||
|
||
echo "Init postgresql database" | ||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql | ||
|
||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis -e "UPDATE llx_const set value = '0666' WHERE name = 'MAIN_UMASK';" | ||
|
||
echo "Init postgresql database" | ||
ps fauxww | grep postgres | ||
ls /etc/postgresql/14/main/ | ||
sudo chmod -R a+rwx /etc/postgresql/14/main/pg_hba.conf | ||
|
||
sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/14/main/pg_hba.conf | ||
sudo cat /etc/postgresql/14/main/pg_hba.conf | ||
|
||
|
@@ -144,7 +144,7 @@ jobs: | |
|
||
sudo mkdir -p /tmp/pgloader | ||
sudo chmod -R a+rwx /tmp/pgloader/ | ||
|
||
echo sudo pgloader mysql://root:[email protected]:32574/travis postgresql://postgres:[email protected]:5432/travis | ||
sudo pgloader mysql://root:[email protected]:32574/travis postgresql://postgres:[email protected]:5432/travis | ||
echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql postgresql://postgres:[email protected]:5432/travis | ||
|
@@ -190,7 +190,7 @@ jobs: | |
echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE | ||
echo '$'force_install_main_data_root=\'/var/www/html\'';' >> $INSTALL_FORCED_FILE | ||
cat $INSTALL_FORCED_FILE | ||
|
||
- name: Create document directory | ||
run: | | ||
echo "Create documents directory and set permissions" | ||
|
@@ -199,9 +199,9 @@ jobs: | |
sudo chmod -R a+rwx /var/www/html/documents | ||
sudo echo "***** First line of dolibarr.log" > /var/www/html/documents/dolibarr.log | ||
sudo chmod a+rwx /var/www/html/documents/dolibarr.log | ||
|
||
- name: Copy app into /var/www | ||
run: | | ||
run: | | ||
sudo cp -r $GITHUB_WORKSPACE/htdocs/. /var/www/html | ||
sudo mv /var/www/html/index.html /var/www/html/index.disabled.html | ||
sudo ln -fs /var/www/html /var/www/htdocs | ||
|
@@ -217,7 +217,7 @@ jobs: | |
a2query -s | ||
a2query -m | ||
ls /etc/apache2/sites-available | ||
#sudo cp -f $GITHUB_WORKSPACE/build/travis-ci/apache-githubaction.conf /etc/apache2/sites-available/000-default.conf | ||
#sudo cp -f $GITHUB_WORKSPACE/dev/build/travis-ci/apache-githubaction.conf /etc/apache2/sites-available/000-default.conf | ||
#sudo sed -e "s?%GITHUB_WORKSPACE%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf | ||
a2ensite 000-default | ||
a2enmod php7.1 | ||
|
@@ -245,7 +245,7 @@ jobs: | |
# The wget should return a page with line '<meta name="generator" content="Dolibarr installer"> | ||
wget -O - --debug http://127.0.0.1 > $GITHUB_WORKSPACE/test.html 2>&1 | ||
head -n 200 $GITHUB_WORKSPACE/test.html | ||
|
||
echo Logs are... | ||
#sudo cat /tmp/install.log | ||
sudo cat /var/log/apache2/access.log | ||
|
@@ -287,7 +287,7 @@ jobs: | |
php upgrade.php 6.0.0 7.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade600700.log | ||
php upgrade2.php 6.0.0 7.0.0 > $GITHUB_WORKSPACE/upgrade600700-2.log | ||
php step5.php 6.0.0 7.0.0 > $GITHUB_WORKSPACE/upgrade600700-3.log | ||
|
||
echo "\dt llx_c_paiement" | psql 'postgresql://postgres:[email protected]:5432/travis' | ||
echo "\dt llx_c_payment_term" | psql 'postgresql://postgres:[email protected]:5432/travis' | ||
|
||
|
@@ -324,17 +324,17 @@ jobs: | |
php upgrade.php 17.0.0 18.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade17001800.log | ||
php upgrade2.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-2.log | ||
php step5.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-3.log | ||
|
||
- name: Result of migration scripts | ||
if: always() | ||
run: | | ||
ls -alrt $GITHUB_WORKSPACE/ | ||
|
||
echo Show content of last file | ||
cat "$(ls -rt $GITHUB_WORKSPACE/ | tail -n1)" | ||
|
||
- name: Enabling new modules | ||
run: | | ||
run: | | ||
# Enable modules not enabled into original dump | ||
set -e | ||
cd /var/www/html/install | ||
|
@@ -361,5 +361,4 @@ jobs: | |
includes/bin/phpunit -d memory_limit=-1 -c /var/www/test/phpunit/phpunittest.xml /var/www/test/phpunit/AllTests.php | ||
phpunitresult=$? | ||
echo "Phpunit return code = $phpunitresult" | ||
set +e | ||
|
||
set +e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ jobs: | |
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Version PHP | ||
run: | | ||
php -i | head - | ||
|
@@ -38,14 +38,14 @@ jobs: | |
sudo composer self-update 2.2.18 | ||
sudo chmod -R a+rwx /home/runner | ||
composer -n config -g vendor-dir htdocs/includes | ||
|
||
sudo add-apt-repository -y ppa:ondrej/php | ||
sudo apt-get update | ||
sudo apt-get install -y pgloader memcached | ||
sudo apt install apache2 php8.1 php8.1-cli php8.1-curl php8.1-mysql php8.1-pgsql php8.1-gd php8.1-imap php8.1-intl php8.1-ldap php8.1-xml php8.1-mbstring php8.1-xml php8.1-zip libapache2-mod-php8.1 | ||
sudo update-alternatives --set php /usr/bin/php8.1 | ||
php -i | head - | ||
|
||
cd $GITHUB_WORKSPACE | ||
ls $GITHUB_WORKSPACE | ||
composer -n require --ignore-platform-reqs phpunit/phpunit ^8 \ | ||
|
@@ -56,7 +56,7 @@ jobs: | |
sudo rm -fr htdocs/includes/phpunit/php-code-coverage/src/Report/Html | ||
|
||
- name: Adding path of binaries tools installed by composer to the PATH | ||
run: | | ||
run: | | ||
export PATH="$GITHUB_WORKSPACE/htdocs/includes/bin:$PATH" | ||
echo $PATH | ||
# We must have a directory bin created by the previous composer call | ||
|
@@ -87,26 +87,26 @@ jobs: | |
psql --version | ||
echo "Check pgloader version" | ||
pgloader --version | ||
|
||
- name: Create database | ||
run: | | ||
pwd | ||
echo GITHUB_WORKSPACE = $GITHUB_WORKSPACE | ||
echo GITHUB_WORKSPACE = $GITHUB_WORKSPACE | ||
sudo apt-get install -y mysql-client | ||
mysql --version | head - | ||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SELECT VERSION();" | head - | ||
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 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 [email protected];' | ||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'FLUSH PRIVILEGES;' | ||
|
||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql | ||
|
||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis -e "UPDATE llx_const set value = '0666' WHERE name = 'MAIN_UMASK';" | ||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql | ||
|
||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis -e "UPDATE llx_const set value = '0666' WHERE name = 'MAIN_UMASK';" | ||
|
||
- name: Generate Dolibarr conf file | ||
run: | | ||
|
@@ -145,7 +145,7 @@ jobs: | |
echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE | ||
echo '$'force_install_main_data_root=\'/var/www/html\'';' >> $INSTALL_FORCED_FILE | ||
cat $INSTALL_FORCED_FILE | ||
|
||
- name: Create document directory | ||
run: | | ||
echo "Create documents directory and set permissions" | ||
|
@@ -154,9 +154,9 @@ jobs: | |
sudo chmod -R a+rwx /var/www/html/documents | ||
sudo echo "***** First line of dolibarr.log" > /var/www/html/documents/dolibarr.log | ||
sudo chmod a+rwx /var/www/html/documents/dolibarr.log | ||
|
||
- name: Copy app into /var/www | ||
run: | | ||
run: | | ||
sudo cp -r $GITHUB_WORKSPACE/htdocs/. /var/www/html | ||
sudo mv /var/www/html/index.html /var/www/html/index.disabled.html | ||
sudo ln -fs /var/www/html /var/www/htdocs | ||
|
@@ -172,7 +172,7 @@ jobs: | |
a2query -s | ||
a2query -m | ||
ls /etc/apache2/sites-available | ||
#sudo cp -f $GITHUB_WORKSPACE/build/travis-ci/apache-githubaction.conf /etc/apache2/sites-available/000-default.conf | ||
#sudo cp -f $GITHUB_WORKSPACE/dev/build/travis-ci/apache-githubaction.conf /etc/apache2/sites-available/000-default.conf | ||
#sudo sed -e "s?%GITHUB_WORKSPACE%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf | ||
a2ensite 000-default | ||
a2enmod php8.1 | ||
|
@@ -200,7 +200,7 @@ jobs: | |
# The wget should return a page with line '<meta name="generator" content="Dolibarr installer"> | ||
wget -O - --debug http://127.0.0.1 > $GITHUB_WORKSPACE/test.html 2>&1 | ||
head -n 200 $GITHUB_WORKSPACE/test.html | ||
|
||
echo Logs are... | ||
#sudo cat /tmp/install.log | ||
sudo cat /var/log/apache2/access.log | ||
|
@@ -274,17 +274,17 @@ jobs: | |
php upgrade.php 17.0.0 18.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade17001800.log | ||
php upgrade2.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-2.log | ||
php step5.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-3.log | ||
|
||
- name: Result of migration scripts | ||
if: always() | ||
run: | | ||
ls -alrt $GITHUB_WORKSPACE/ | ||
|
||
echo Show content of last file | ||
cat "$(ls -rt $GITHUB_WORKSPACE/ | tail -n1)" | ||
|
||
- name: Enabling new modules | ||
run: | | ||
run: | | ||
# Enable modules not enabled into original dump | ||
set -e | ||
cd /var/www/html/install | ||
|
@@ -311,7 +311,7 @@ jobs: | |
includes/bin/phpunit -d memory_limit=-1 -c /var/www/test/phpunit/phpunittest.xml /var/www/test/phpunit/AllTests.php | ||
phpunitresult=$? | ||
echo "Phpunit return code = $phpunitresult" | ||
set +e | ||
set +e | ||
|
||
- name: Code quality check - Lint | ||
if: github.event_name == 'push' | ||
|
@@ -325,10 +325,9 @@ jobs: | |
- name: Code quality check - phpcs | ||
if: github.event_name == 'push' | ||
run: | | ||
htdocs/includes/bin/phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .; | ||
htdocs/includes/bin/phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .; | ||
|
||
- name: Code quality check - var-dump-check | ||
if: github.event_name == 'push' | ||
run: | | ||
htdocs/includes/bin/var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php . | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,8 +60,8 @@ jobs: | |
github_token: ${{ env.GH_TOKEN }} | ||
phpstan_path: phpstan | ||
configuration_path: phpstan.neon.dist | ||
phpstan_additional_arguments: --memory-limit 7G -a build/phpstan/bootstrap_action.php | ||
baseline_path: build/phpstan/phpstan-baseline.neon | ||
phpstan_additional_arguments: --memory-limit 7G -a dev/build/phpstan/bootstrap_action.php | ||
baseline_path: dev/build/phpstan/phpstan-baseline.neon | ||
commit_name: Dolibot | ||
commit_email: [email protected] | ||
commit_message: PHPStan > Update baseline | ||
|
Oops, something went wrong.