2021-01-11 20:39:15 +03:00
|
|
|
name: Lint
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
phpcs:
|
2021-05-30 21:04:57 +03:00
|
|
|
runs-on: ubuntu-20.04
|
2021-01-11 20:39:15 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-06-19 22:45:33 +03:00
|
|
|
php-versions: ['7.4']
|
2021-01-11 20:39:15 +03:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: ${{ matrix.php-versions }}
|
|
|
|
tools: phpcs
|
|
|
|
- run: phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p
|
|
|
|
|
|
|
|
phpcompatibility:
|
2021-05-30 21:04:57 +03:00
|
|
|
runs-on: ubuntu-20.04
|
2021-01-11 20:39:15 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-06-19 22:45:33 +03:00
|
|
|
php-versions: ['7.4']
|
2021-01-11 20:39:15 +03:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: ${{ matrix.php-versions }}
|
2021-01-12 10:02:49 +03:00
|
|
|
- run: composer global require dealerdirect/phpcodesniffer-composer-installer
|
2022-07-01 16:02:04 +03:00
|
|
|
- run: composer global config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
|
2021-01-12 10:02:49 +03:00
|
|
|
- run: composer global require phpcompatibility/php-compatibility
|
|
|
|
- run: ~/.composer/vendor/bin/phpcs . --standard=phpcompatibility.xml --warning-severity=0 --extensions=php -p
|
2022-01-30 12:20:47 +03:00
|
|
|
|
|
|
|
executable_php_files_check:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- run: |
|
|
|
|
if find -name "*.php" -executable -type f -print -exec false {} +
|
|
|
|
then
|
|
|
|
echo 'Good, no executable php scripts found'
|
|
|
|
else
|
|
|
|
echo 'Please unmark php scripts above as non-executable'
|
|
|
|
exit 1
|
|
|
|
fi
|