File tree Expand file tree Collapse file tree 1 file changed +59
-0
lines changed
Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ name : PHP Code Linting
2+
3+ on :
4+ push :
5+ branches :
6+ - trunk
7+ - ' feature/**'
8+ - ' release/**'
9+ # Only run if PHP-related files changed.
10+ paths :
11+ - ' .github/workflows/php-lint.yml'
12+ - ' **.php'
13+ - ' phpcs.xml.dist'
14+ - ' phpstan.neon.dist'
15+ - ' composer.json'
16+ - ' composer.lock'
17+ pull_request :
18+ # Only run if PHP-related files changed.
19+ paths :
20+ - ' .github/workflows/php-lint.yml'
21+ - ' **.php'
22+ - ' phpcs.xml.dist'
23+ - ' phpstan.neon.dist'
24+ - ' composer.json'
25+ - ' composer.lock'
26+ types :
27+ - opened
28+ - reopened
29+ - synchronize
30+
31+ concurrency :
32+ group : ${{ github.workflow }}-${{ github.ref }}
33+ cancel-in-progress : ${{ github.ref != 'refs/heads/main' }}
34+
35+ jobs :
36+ php-lint :
37+ name : PHP
38+ runs-on : ubuntu-latest
39+ timeout-minutes : 20
40+ steps :
41+ - uses : actions/checkout@v4
42+
43+ - uses : shivammathur/setup-php@v2
44+ with :
45+ php-version : ' latest'
46+
47+ - name : Validate Composer configuration
48+ run : composer validate
49+
50+ - name : Install PHP dependencies
51+ uses : ramsey/composer-install@v3
52+ with :
53+ composer-options : ' --prefer-dist'
54+
55+ - name : PHPStan
56+ run : composer phpstan
57+
58+ - name : PHP Code Sniffer
59+ run : composer phpcs
You can’t perform that action at this time.
0 commit comments