Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/pint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Pint

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
pint:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.5'

- name: Get composer cache
uses: actions/cache@v4
with:
path: ~/.composer/cache
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Install composer deps
run: composer install --no-progress --no-suggest --prefer-dist

- name: Run Laravel Pint (test)
run: ./vendor/bin/pint --test
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/vendor
/.phpunit.result.cache
/.phpunit.result.cache
/node_modules
26 changes: 24 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,31 @@
"php": ">=8.3"
},
"require-dev": {
"phpunit/phpunit": "^12"
"phpunit/phpunit": "^12",
"laravel/pint": "^1.27",
"brainmaestro/composer-git-hooks": "^3.0"
},
"scripts": {
"test": "phpunit"
"test": "phpunit",
"cghooks": "vendor/bin/cghooks",
"post-install-cmd": [
"cghooks add --ignore-lock"
],
"post-update-cmd": [
"cghooks update"
]
},
"extra": {
"hooks": {
"pre-commit": [
"./vendor/bin/pint --dirty",
"git add -A"
]
}
},
"config": {
"platform": {
"php": "8.3.30"
}
}
}
Loading