-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (33 loc) · 1.17 KB
/
Copy pathcode-style.yaml
File metadata and controls
43 lines (33 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Code Style
on:
push:
branches:
- main
pull_request:
jobs:
code-style:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v7
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
- name: Install dependencies
run: composer install --no-interaction
- name: Run Pint
run: ./vendor/bin/pint -v
- name: Run Rector
run: ./vendor/bin/rector process --dry-run
- name: Format pint.json
run: ./scripts/format-pint-json.sh
- name: Format PHPStan stubs
run: ./scripts/phpstan/format-stubs.sh
- name: Check for uncommitted changes
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "::error::Code style issues detected. Please run 'composer pint', './scripts/format-pint-json.sh', and './scripts/phpstan/format-stubs.sh' locally."
git diff
exit 1
fi