-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add PHP Linting (Pint) github action
Signed-off-by: Sam Poyigi <[email protected]>
- Loading branch information
Showing
3 changed files
with
77 additions
and
0 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,25 @@ | ||
name: PHP Linting (Pint) | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
phplint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Composer Install | ||
run: composer install --no-interaction --ignore-platform-reqs | ||
|
||
- name: Remove Extensions & Themes | ||
run: rm -rf extensions themes | ||
|
||
- name: Run Laravel Pint | ||
run: ./vendor/bin/pint | ||
|
||
- name: Commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: PHP Linting (Pint) - Fix styling | ||
skip_fetch: true |
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,31 @@ | ||
name: Tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
PHPUnitTests: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
max-parallel: 6 | ||
matrix: | ||
php: ['7.4', '8.0', '8.1'] | ||
fail-fast: false | ||
|
||
name: 'PHPUnit Tests ${{ matrix.php }} / ${{ matrix.dbName }}' | ||
|
||
steps: | ||
- name: Checkout changes | ||
uses: actions/checkout@v1 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@master | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: mbstring, intl, gd, xml, sqlite | ||
|
||
- name: Install composer dependencies | ||
run: composer install --no-interaction --no-progress --no-scripts | ||
|
||
- name: Run PHPUnit Test Suite | ||
run: ./vendor/bin/phpunit ./tests |
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,21 @@ | ||
{ | ||
"rules": { | ||
"method_chaining_indentation": true, | ||
"logical_operators": true, | ||
"simplified_null_return": false, | ||
"cast_spaces": false, | ||
"no_unreachable_default_argument_value": false, | ||
"no_alternative_syntax": false, | ||
"not_operator_with_successor_space": false, | ||
"no_trailing_comma_in_list_call": false, | ||
"phpdoc_summary": false, | ||
"braces": false, | ||
"self_accessor": false, | ||
"Laravel/laravel_phpdoc_separation": false, | ||
"Laravel/laravel_phpdoc_alignment": false, | ||
"no_trailing_comma_in_singleline": false, | ||
"blank_line_before_statement": { | ||
"statements": ["declare", "return", "throw", "try"] | ||
} | ||
} | ||
} |