-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add phpstan, ecs and rector; Add GitHub CI workflow
- Loading branch information
1 parent
1053323
commit 67cad6b
Showing
7 changed files
with
91 additions
and
33 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 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# Top-most EditorConfig file | ||
root = true | ||
|
||
# All files | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# PHP files | ||
[*.php] | ||
indent_size = 4 | ||
|
||
# Markdown files | ||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
# Indentation override for all HTML, CSS/SCSS, JS, and Vue files | ||
[*.{html,css,scss,js,vue,twig}] | ||
indent_style = tab |
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,52 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
ecs: | ||
name: ECS Check | ||
runs-on: ubuntu-latest | ||
env: | ||
DEFAULT_COMPOSER_FLAGS: "--no-interaction --no-ansi --no-progress" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
- run: composer install --prefer-dist --no-progress | ||
- name: Run ecs check | ||
run: | | ||
vendor/bin/ecs --memory-limit=1G --no-progress-bar | ||
rector: | ||
name: Rector dry-run | ||
runs-on: ubuntu-latest | ||
env: | ||
DEFAULT_COMPOSER_FLAGS: "--no-interaction --no-ansi --no-progress" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
- run: composer install --prefer-dist --no-progress | ||
- name: Run rector --dry-run | ||
run: | | ||
vendor/bin/rector --memory-limit=1G --no-progress-bar --dry-run | ||
phpstan: | ||
name: PHPStan | ||
runs-on: ubuntu-latest | ||
env: | ||
DEFAULT_COMPOSER_FLAGS: "--no-interaction --no-ansi --no-progress" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
- run: composer install --prefer-dist --no-progress | ||
- name: Run phpstan | ||
run: | | ||
vendor/bin/phpstan --memory-limit=1G |
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
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
includes: | ||
- vendor/craftcms/phpstan/phpstan.neon | ||
- vendor/fostercommerce/phpstan/phpstan.neon | ||
|
||
parameters: | ||
level: 0 | ||
paths: | ||
- src |
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