generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #326 from phh/feature/github-workflows
Add workflows: Phpstan, formatting and tests
- Loading branch information
Showing
47 changed files
with
3,156 additions
and
2,842 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Fix PHP code style issues | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**.php' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
php-code-styling: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Fix PHP code style issues | ||
uses: aglipanci/[email protected] | ||
|
||
- name: Commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: Fix styling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: PHPStan | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**.php' | ||
- 'phpstan.neon.dist' | ||
- '.github/workflows/phpstan.yml' | ||
|
||
jobs: | ||
phpstan: | ||
name: phpstan | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.1' | ||
coverage: none | ||
|
||
- name: Install composer dependencies | ||
uses: ramsey/composer-install@v2 | ||
|
||
- name: Run PHPStan | ||
run: ./vendor/bin/phpstan --error-format=github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: run-tests | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**.php' | ||
- '.github/workflows/run-tests.yml' | ||
- 'phpunit.xml.dist' | ||
- 'composer.json' | ||
- 'composer.lock' | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 5 | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
php: [8.3, 8.2, 8.1] | ||
laravel: [10.*] | ||
stability: [prefer-lowest, prefer-stable] | ||
include: | ||
- laravel: 10.* | ||
testbench: 8.* | ||
carbon: ^2.63 | ||
|
||
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo | ||
coverage: none | ||
|
||
- name: Setup problem matchers | ||
run: | | ||
echo "::add-matcher::${{ runner.tool_cache }}/php.json" | ||
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
- name: Install dependencies | ||
run: | | ||
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update | ||
composer update --${{ matrix.stability }} --prefer-dist --no-interaction | ||
- name: List Installed Dependencies | ||
run: composer show -D | ||
|
||
- name: Execute tests | ||
run: vendor/bin/pest --ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Access to an undefined property Illuminate\\\\Contracts\\\\Auth\\\\Authenticatable\\:\\:\\$two_factor_secret\\.$#" | ||
count: 1 | ||
path: src/BreezyCore.php | ||
|
||
- | ||
message: "#^Access to an undefined property Jeffgreco13\\\\FilamentBreezy\\\\Livewire\\\\MyProfileComponent\\:\\:\\$view\\.$#" | ||
count: 1 | ||
path: src/Livewire/MyProfileComponent.php | ||
|
||
- | ||
message: "#^Access to an undefined property Jeffgreco13\\\\FilamentBreezy\\\\Livewire\\\\PersonalInfo\\:\\:\\$form\\.$#" | ||
count: 2 | ||
path: src/Livewire/PersonalInfo.php | ||
|
||
- | ||
message: "#^Call to an undefined method Filament\\\\Contracts\\\\Plugin\\|Filament\\\\FilamentManager\\:\\:getAvatarUploadComponent\\(\\)\\.$#" | ||
count: 2 | ||
path: src/Livewire/PersonalInfo.php | ||
|
||
- | ||
message: "#^Call to an undefined method Filament\\\\Contracts\\\\Plugin\\|Filament\\\\FilamentManager\\:\\:hasAvatars\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Livewire/PersonalInfo.php | ||
|
||
- | ||
message: "#^Access to static property \\$personalAccessTokenModel on an unknown class Laravel\\\\Sanctum\\\\Sanctum\\.$#" | ||
count: 1 | ||
path: src/Livewire/SanctumTokens.php | ||
|
||
- | ||
message: "#^Call to an undefined method Filament\\\\Contracts\\\\Plugin\\|Filament\\\\FilamentManager\\:\\:getSanctumPermissions\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Livewire/SanctumTokens.php | ||
|
||
- | ||
message: "#^Call to an undefined method Filament\\\\Contracts\\\\Plugin\\|Filament\\\\FilamentManager\\:\\:getTwoFactorQrCodeSvg\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Livewire/TwoFactorAuthentication.php | ||
|
||
- | ||
message: "#^Call to an undefined method Filament\\\\Contracts\\\\Plugin\\|Filament\\\\FilamentManager\\:\\:shouldForceTwoFactor\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Livewire/TwoFactorAuthentication.php | ||
|
||
- | ||
message: "#^Call to an undefined method Filament\\\\Contracts\\\\Plugin\\|Filament\\\\FilamentManager\\:\\:verify\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Livewire/TwoFactorAuthentication.php | ||
|
||
- | ||
message: "#^Access to an undefined property Jeffgreco13\\\\FilamentBreezy\\\\Livewire\\\\UpdatePassword\\:\\:\\$form\\.$#" | ||
count: 1 | ||
path: src/Livewire/UpdatePassword.php | ||
|
||
- | ||
message: "#^Call to an undefined method Filament\\\\Contracts\\\\Plugin\\|Filament\\\\FilamentManager\\:\\:getPasswordUpdateRequiresCurrent\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Livewire/UpdatePassword.php | ||
|
||
- | ||
message: "#^Call to an undefined method Filament\\\\Contracts\\\\Plugin\\|Filament\\\\FilamentManager\\:\\:getPasswordUpdateRules\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Livewire/UpdatePassword.php | ||
|
||
- | ||
message: "#^Call to an undefined method Filament\\\\Contracts\\\\Plugin\\|Filament\\\\FilamentManager\\:\\:shouldForceTwoFactor\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Middleware/MustTwoFactor.php | ||
|
||
- | ||
message: "#^Call to an undefined method Illuminate\\\\Foundation\\\\Auth\\\\User\\:\\:hasConfirmedTwoFactor\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Middleware/MustTwoFactor.php | ||
|
||
- | ||
message: "#^Call to an undefined method Illuminate\\\\Foundation\\\\Auth\\\\User\\:\\:hasValidTwoFactorSession\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Middleware/MustTwoFactor.php | ||
|
||
- | ||
message: "#^Access to an undefined property Jeffgreco13\\\\FilamentBreezy\\\\Models\\\\BreezySession\\:\\:\\$authenticatable\\.$#" | ||
count: 1 | ||
path: src/Models/BreezySession.php | ||
|
||
- | ||
message: "#^Access to an undefined property Jeffgreco13\\\\FilamentBreezy\\\\Models\\\\BreezySession\\:\\:\\$two_factor_confirmed_at\\.$#" | ||
count: 1 | ||
path: src/Models/BreezySession.php | ||
|
||
- | ||
message: "#^Access to an undefined property Jeffgreco13\\\\FilamentBreezy\\\\Models\\\\BreezySession\\:\\:\\$two_factor_secret\\.$#" | ||
count: 2 | ||
path: src/Models/BreezySession.php | ||
|
||
- | ||
message: "#^Property 'expires_at' does not exist in Jeffgreco13\\\\FilamentBreezy\\\\Models\\\\BreezySession model\\.$#" | ||
count: 1 | ||
path: src/Models/BreezySession.php | ||
|
||
- | ||
message: "#^Property 'two_factor_confirmed_at' does not exist in Jeffgreco13\\\\FilamentBreezy\\\\Models\\\\BreezySession model\\.$#" | ||
count: 1 | ||
path: src/Models/BreezySession.php | ||
|
||
- | ||
message: "#^Call to an undefined method Filament\\\\Contracts\\\\Plugin\\|Filament\\\\FilamentManager\\:\\:getNavigationGroup\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Pages/MyProfilePage.php | ||
|
||
- | ||
message: "#^Call to an undefined method Filament\\\\Contracts\\\\Plugin\\|Filament\\\\FilamentManager\\:\\:getRegisteredMyProfileComponents\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Pages/MyProfilePage.php | ||
|
||
- | ||
message: "#^Call to an undefined method Filament\\\\Contracts\\\\Plugin\\|Filament\\\\FilamentManager\\:\\:shouldRegisterNavigation\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Pages/MyProfilePage.php | ||
|
||
- | ||
message: "#^Call to an undefined method Filament\\\\Contracts\\\\Plugin\\|Filament\\\\FilamentManager\\:\\:slug\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Pages/MyProfilePage.php | ||
|
||
- | ||
message: "#^Expression on left side of \\?\\? is not nullable\\.$#" | ||
count: 1 | ||
path: src/Pages/MyProfilePage.php | ||
|
||
- | ||
message: "#^Access to an undefined property Illuminate\\\\Foundation\\\\Auth\\\\User\\:\\:\\$two_factor_recovery_codes\\.$#" | ||
count: 1 | ||
path: src/Pages/TwoFactorPage.php | ||
|
||
- | ||
message: "#^Access to an undefined property Jeffgreco13\\\\FilamentBreezy\\\\Pages\\\\TwoFactorPage\\:\\:\\$form\\.$#" | ||
count: 1 | ||
path: src/Pages/TwoFactorPage.php | ||
|
||
- | ||
message: "#^Call to an undefined method Filament\\\\Contracts\\\\Plugin\\|Filament\\\\FilamentManager\\:\\:verify\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Pages/TwoFactorPage.php | ||
|
||
- | ||
message: "#^Call to an undefined method Illuminate\\\\Foundation\\\\Auth\\\\User\\:\\:hasValidTwoFactorSession\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Pages/TwoFactorPage.php | ||
|
||
- | ||
message: "#^Call to an undefined method Illuminate\\\\Foundation\\\\Auth\\\\User\\:\\:setTwoFactorSession\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Pages/TwoFactorPage.php | ||
|
||
- | ||
message: "#^Method Jeffgreco13\\\\FilamentBreezy\\\\Pages\\\\TwoFactorPage\\:\\:getFormActions\\(\\) has invalid return type Jeffgreco13\\\\FilamentBreezy\\\\Pages\\\\ActionGroup\\.$#" | ||
count: 1 | ||
path: src/Pages/TwoFactorPage.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.