Skip to content

Commit 14c0ddc

Browse files
committed
Group lint checks as matrix and use PHP 8.3 for PHP-CS-Fixer
1 parent 4c0523c commit 14c0ddc

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,27 @@ jobs:
131131
run: XDEBUG_MODE=off tools/phpstan analyse --no-progress --error-format=github
132132

133133
lint:
134-
name: Lint
134+
name: "Lint (${{ matrix.name }})"
135135
needs:
136136
- dependency-validation
137137
runs-on: ubuntu-latest
138138
timeout-minutes: 10
139+
strategy:
140+
fail-fast: false
141+
matrix:
142+
include:
143+
- id: rector
144+
name: Rector
145+
php: "8.5"
146+
command: tools/rector --ansi --dry-run
147+
- id: php-cs-fixer
148+
name: PHP-CS-Fixer
149+
php: "8.3"
150+
command: tools/php-cs-fixer check --ansi --diff --verbose
151+
- id: composer-normalize
152+
name: Composer Normalize
153+
php: "8.5"
154+
command: tools/composer-normalize --ansi --dry-run
139155

140156
steps:
141157
- name: Checkout code
@@ -144,7 +160,7 @@ jobs:
144160
- name: Setup PHP
145161
uses: shivammathur/setup-php@v2
146162
with:
147-
php-version: "8.5"
163+
php-version: ${{ matrix.php }}
148164
tools: composer, pecl
149165
coverage: none
150166

@@ -165,19 +181,18 @@ jobs:
165181
run: composer install --no-interaction --no-progress --ansi --ignore-platform-req=ext-grpc
166182

167183
- name: Cache Rector dependencies
184+
if: ${{ matrix.id == 'rector' }}
168185
uses: actions/cache@v5
169186
with:
170187
path: tools/.rector/vendor
171188
key: ${{ runner.os }}-rector-tools-${{ hashFiles('tools/.rector/composer.lock') }}
172189

173190
- name: Install Rector dependencies
191+
if: ${{ matrix.id == 'rector' }}
174192
run: composer --working-dir=tools/.rector install --no-interaction --no-progress --ansi
175193

176-
- name: Run linter suite
177-
run: |
178-
tools/rector --ansi --dry-run
179-
tools/php-cs-fixer check --ansi --diff --verbose
180-
tools/composer-normalize --ansi --dry-run
194+
- name: "Run ${{ matrix.name }}"
195+
run: ${{ matrix.command }}
181196

182197
tests:
183198
name: "PHP ${{ matrix.php }}, ${{ matrix.dependencies }} deps"

0 commit comments

Comments
 (0)