Skip to content

Commit

Permalink
ci: laravel 10 and 11
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunthegeek committed Nov 17, 2024
1 parent b1938aa commit e040f32
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/laravel-10.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Laravel 10
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
name: Test
runs-on: ubuntu-latest
container:
image: laravelfans/laravel:10-dev
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: PHPUnit
env:
XDEBUG_MODE: coverage
run: |
composer require orchestra/testbench:^v8 --dev
./vendor/bin/phpunit --coverage-clover coverage.xml --coverage-filter src/ tests/
-
name: Lint
run: |
./vendor/bin/phpcs --standard=PSR12 src/ tests/
./vendor/bin/phpmd . text src/stubs/phpmd.xml
-
name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
name: laravel-10
token: ${{ secrets.CODECOV_TOKEN }}
-
name: install in real Laravel project
run: |
rm -rf laravel-demo
composer create-project --prefer-dist laravel/laravel laravel-demo "10.*"
cd laravel-demo && composer require --dev laravel-fans/lint:dev-${CI_ACTION_REF_NAME} && php artisan lint:publish
php artisan lint:code --help
php artisan lint:code database/
44 changes: 44 additions & 0 deletions .github/workflows/laravel-11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Laravel 11
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
name: Test
runs-on: ubuntu-latest
container:
image: laravelfans/laravel:11-dev
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: PHPUnit
env:
XDEBUG_MODE: coverage
run: |
composer require orchestra/testbench:^v9 --dev
./vendor/bin/phpunit --coverage-clover coverage.xml --coverage-filter src/ tests/
-
name: Lint
run: |
./vendor/bin/phpcs --standard=PSR12 src/ tests/
./vendor/bin/phpmd . text src/stubs/phpmd.xml
-
name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
name: laravel-11
token: ${{ secrets.CODECOV_TOKEN }}
-
name: install in real Laravel project
run: |
rm -rf laravel-demo
composer create-project --prefer-dist laravel/laravel laravel-demo "11.*"
cd laravel-demo && composer require --dev laravel-fans/lint:dev-${CI_ACTION_REF_NAME} && php artisan lint:publish
php artisan lint:code --help
php artisan lint:code database/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
[![codecov](https://codecov.io/gh/laravel-fans/laravel-lint/graph/badge.svg?token=QJjYkPVnr4)](https://codecov.io/gh/laravel-fans/laravel-lint)
![Packagist Downloads](https://img.shields.io/packagist/dm/laravel-fans/lint)
[![Laravel 9](https://github.com/laravel-fans/laravel-lint/actions/workflows/laravel-9.yml/badge.svg)](https://github.com/laravel-fans/laravel-lint/actions/workflows/laravel-9.yml)
[![Laravel 10](https://github.com/laravel-fans/laravel-lint/actions/workflows/laravel-10.yml/badge.svg)](https://github.com/laravel-fans/laravel-lint/actions/workflows/laravel-10.yml)
[![Laravel 11](https://github.com/laravel-fans/laravel-lint/actions/workflows/laravel-11.yml/badge.svg)](https://github.com/laravel-fans/laravel-lint/actions/workflows/laravel-11.yml)

Check Code Style(default PSR-12) for Laravel

Expand Down

0 comments on commit e040f32

Please sign in to comment.