2021-08-16 14:12:25 +03:00
|
|
|
name: "Code Quality Check"
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- "**.php"
|
|
|
|
- "phpcs.xml"
|
|
|
|
- ".github/workflows/code_quality.yml"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
phpcs:
|
|
|
|
name: "PHP CodeSniffer"
|
|
|
|
runs-on: ubuntu-latest
|
2023-10-05 23:15:29 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
php-version: ['7.3', '7.4', '8.0', '8.1', '8.2']
|
2021-08-16 14:12:25 +03:00
|
|
|
steps:
|
|
|
|
- name: Check out code into the workspace
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Run PHPCS
|
|
|
|
uses: chekalsky/phpcs-action@v1
|
|
|
|
phpmd:
|
|
|
|
name: "PHP MessDetector"
|
|
|
|
runs-on: ubuntu-latest
|
2023-10-05 23:15:29 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
php-version: ['7.3', '7.4', '8.0', '8.1', '8.2']
|
2021-08-16 14:12:25 +03:00
|
|
|
steps:
|
|
|
|
- name: Check out code into the workspace
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Run PHPMD
|
|
|
|
uses: GeneaLabs/action-reviewdog-phpmd@1.0.0
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
level: 'warning'
|
|
|
|
reporter: github-pr-check
|
2023-10-05 23:15:29 +03:00
|
|
|
standard: './phpmd.xml.dist'
|
2021-08-16 14:12:25 +03:00
|
|
|
target_directory: 'src'
|
|
|
|
phpstan:
|
|
|
|
name: PHPStan
|
2023-10-05 23:15:29 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
php-version: ['7.3', '7.4', '8.0', '8.1', '8.2']
|
2021-08-16 14:12:25 +03:00
|
|
|
steps:
|
|
|
|
- name: Check out code into the workspace
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Run PHPStan
|
2023-10-05 23:15:29 +03:00
|
|
|
uses: docker://oskarstark/phpstan-ga:1.8.0
|
2021-08-16 14:12:25 +03:00
|
|
|
with:
|
2023-10-05 23:15:29 +03:00
|
|
|
args: analyse src -c phpstan.neon --memory-limit=1G --no-progress
|
|
|
|
|