Skip to content

Merge pull request #394 from ATM-Consulting/FIX_DA023556_date_creation #7

Merge pull request #394 from ATM-Consulting/FIX_DA023556_date_creation

Merge pull request #394 from ATM-Consulting/FIX_DA023556_date_creation #7

Workflow file for this run

name: GitHub CI Coding Style
on:
push:
pull_request:
types: [opened]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: password
ports:
- 32574:3306
steps:
# git clone dolibarr into GITHUB_WORKSPACE = /home/runner/work/dolibarr/dolibarr
- uses: actions/checkout@v3
- name: Version PHP
run: |
php -i | head -
- name: Set vendor-dir
run: composer -n config -g vendor-dir htdocs/includes
#- name: Install packages for PHP 7.1
# run: |
# composer -n require phpunit/phpunit ^7.5 \
# php-parallel-lint/php-parallel-lint ^1 \
# php-parallel-lint/php-console-highlighter ^0 \
# php-parallel-lint/php-var-dump-check ~0.4 \
# squizlabs/php_codesniffer ^3
- name: Install packages for PHP 8.1
run: |
composer -n require --ignore-platform-reqs phpunit/phpunit ^8 \
php-parallel-lint/php-parallel-lint ^1.2 \
php-parallel-lint/php-console-highlighter ^0 \
php-parallel-lint/php-var-dump-check ~0.4 \
squizlabs/php_codesniffer ^3
- name: Adding path of binaries tools installed by composer to the PATH
run: |
export PATH="$GITHUB_WORKSPACE/htdocs/includes/bin:$PATH"
echo $PATH
ls $GITHUB_WORKSPACE/htdocs/includes/bin
- name: Version information
run: |
composer -V
# Check Parallel-lint version
echo "Parallel-lint version"
htdocs/includes/bin/parallel-lint -V
# Check PHP CodeSniffer version
echo "PHPCS version"
htdocs/includes/bin/phpcs --version | head -
htdocs/includes/bin/phpcs -i | head -
# Check PHP Vardump check version
echo "PHP Vardump check version"
htdocs/includes/bin/var-dump-check --version
# Check PHPUnit version
echo "PHPUnit version"
htdocs/includes/bin/phpunit --version | head -
# Check Apache version
echo "Apache version"
apache2 -v | head -
# Check Database
echo "Database version"
mysql --version | head -
psql --version
- name: lint
run: |
htdocs/includes/bin/parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
- name: phpcs
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 .;
- name: var-dump-check
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 .