feat: integrate PHPStan, Rector and Pint code quality tools (#13)
* feat: integrate PHPStan, Rector and Pint code quality tools - Add larastan, rector, and rector-laravel dev dependencies - Configure PHPStan at max level with Larastan extension - Configure Rector with Laravel sets and code quality rules - Configure Pint with strict rules (final_class, strict_types) - Add composer scripts: lint, test:lint, test:types, test:unit - Add GitHub Actions workflow for CI on push/PR - Apply code style fixes across all files * docs: add code quality section to README
This commit is contained in:
committed by
GitHub
parent
d961b44c30
commit
f417ec23c2
55
.github/workflows/tests.yml
vendored
Normal file
55
.github/workflows/tests.yml
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
name: tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.3
|
||||
tools: composer:v2
|
||||
coverage: xdebug
|
||||
|
||||
- name: Install Dependencies
|
||||
run: composer install --no-interaction --prefer-dist --optimize-autoloader
|
||||
|
||||
- name: Copy Environment File
|
||||
run: cp .env.example .env
|
||||
|
||||
- name: Generate Application Key
|
||||
run: php artisan key:generate
|
||||
|
||||
- name: Create Database
|
||||
run: touch database/database.sqlite
|
||||
|
||||
- name: Rector Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /tmp/rector
|
||||
key: ${{ runner.os }}-rector-${{ hashFiles('composer.lock') }}
|
||||
restore-keys: ${{ runner.os }}-rector-
|
||||
- run: mkdir -p /tmp/rector
|
||||
|
||||
- name: PHPStan Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /tmp/phpstan
|
||||
key: ${{ runner.os }}-phpstan-${{ hashFiles('composer.lock') }}
|
||||
restore-keys: ${{ runner.os }}-phpstan-
|
||||
- run: mkdir -p /tmp/phpstan
|
||||
|
||||
- name: Tests
|
||||
run: composer test
|
||||
Reference in New Issue
Block a user