File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : PHP Code Sniffer
2+
3+ on :
4+ push :
5+ branches : [ master, main ]
6+ pull_request :
7+ branches : [ master, main ]
8+
9+ jobs :
10+ phpcs :
11+ name : Run PHPCS
12+ runs-on : ubuntu-latest
13+
14+ strategy :
15+ matrix :
16+ php-version : ['8.1', '8.2', '8.3']
17+
18+ steps :
19+ - name : Checkout code
20+ uses : actions/checkout@v4
21+
22+ - name : Setup PHP
23+ uses : shivammathur/setup-php@v2
24+ with :
25+ php-version : ${{ matrix.php-version }}
26+ coverage : none
27+
28+ - name : Validate composer.json and composer.lock
29+ run : composer validate --strict
30+
31+ - name : Cache Composer dependencies
32+ uses : actions/cache@v3
33+ with :
34+ path : /tmp/composer-cache
35+ key : ${{ runner.os }}-php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.lock') }}
36+ restore-keys : |
37+ ${{ runner.os }}-php-${{ matrix.php-version }}-composer-
38+
39+ - name : Install dependencies
40+ run : composer install --prefer-dist --no-progress --no-interaction
41+
42+ - name : Run PHPCS
43+ run : vendor/bin/phpcs
44+
You can’t perform that action at this time.
0 commit comments