Skip to content

Commit 3e7693d

Browse files
Rename CI workflow to 'Lint and Test' and enhance style drift detection logic
1 parent 5d77a3a commit 3e7693d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Lint and Test
22

33
on:
44
push:
@@ -33,8 +33,13 @@ jobs:
3333
- name: PHPCS (PSR-12)
3434
run: composer run lint
3535

36-
- name: Detect style drift (phpcbf --dry-run)
37-
run: vendor/bin/phpcbf --standard=phpcs.xml --dry-run --no-patch
36+
- name: Detect style drift (fail if auto-fixes needed)
37+
shell: bash
38+
run: |
39+
# Run phpcbf to apply auto-fixes into the working tree
40+
vendor/bin/phpcbf --standard=phpcs.xml --no-patch || true
41+
# Fail if any changes were made by phpcbf (style drift)
42+
git --no-pager diff --name-only --exit-code || { echo "::error ::Style drift detected. Please run phpcbf locally."; exit 1; }
3843
3944
- name: PHPStan (max level)
4045
run: composer run stan

0 commit comments

Comments
 (0)