Skip to content

Commit

Permalink
Update github action config file
Browse files Browse the repository at this point in the history
  • Loading branch information
guanguans committed Jun 21, 2023
1 parent 93ad38f commit c19228d
Show file tree
Hide file tree
Showing 9 changed files with 112 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
key: composer-${{ hashFiles('composer.lock') }}

- name: Run composer install
run: composer install --prefer-dist --ansi --no-interaction --no-scripts --ansi -v
run: composer install --prefer-dist --ansi --no-interaction --ansi -v

- name: Install global php-cs-fixer
run: composer global require friendsofphp/php-cs-fixer --prefer-dist --ansi --no-interaction --no-scripts
# - name: Install global php-cs-fixer
# run: composer global require friendsofphp/php-cs-fixer --prefer-dist --ansi --no-interaction --no-scripts

- name: Run php-cs-fixer
run: composer style-fix
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
key: composer-${{ hashFiles('composer.lock') }}

- name: Run composer install
run: composer install --prefer-dist --ansi --no-interaction --no-scripts --ansi -v
run: composer install --prefer-dist --ansi --no-interaction --ansi -v

- name: Install global psalm
run: composer global require vimeo/psalm --prefer-dist --ansi --no-interaction --no-scripts
# - name: Install global psalm
# run: composer global require vimeo/psalm --prefer-dist --ansi --no-interaction --no-scripts

- name: Run psalm
run: composer psalm
6 changes: 3 additions & 3 deletions .github/workflows/rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
key: composer-${{ hashFiles('composer.lock') }}

- name: Run composer install
run: composer install --prefer-dist --ansi --no-interaction --no-scripts --ansi -v
run: composer install --prefer-dist --ansi --no-interaction --ansi -v

- name: Install global rector
run: composer global require rector/rector --prefer-dist --ansi --no-interaction --no-scripts
# - name: Install global rector
# run: composer global require rector/rector --prefer-dist --ansi --no-interaction --no-scripts

- name: Run rector
run: composer rector-dry-run
4 changes: 4 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@

// dd(json_encode($header, JSON_UNESCAPED_SLASHES));

if (! is_dir($dir = __DIR__.'/build/php-cs-fixer') && ! mkdir($dir, 0777, true) && ! is_dir($dir)) {
throw new RuntimeException("The directory [$dir] was not created.");
}

// @see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer
// @see https://cs.symfony.com
// @see https://mlocati.github.io/php-cs-fixer-configurator
Expand Down
17 changes: 9 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8",
"brainmaestro/composer-git-hooks": "^2.8",
"guzzlehttp/guzzle": "^7.7",
"illuminate/http": "^8.83 || ^9.0 || ^10.0",
"illuminate/translation": "^8.83 || ^9.0 || ^10.0",
Expand Down Expand Up @@ -129,7 +130,7 @@
],
"post-autoload-dump": [],
"ai-commit": "@php ./builds/ai-commit commit --ansi",
"cghooks": "@php cghooks --ansi -v",
"cghooks": "@php ./vendor/bin/cghooks --ansi -v",
"cghooks-install": [
"@cghooks add --ignore-lock",
"@cghooks update"
Expand All @@ -138,7 +139,7 @@
"@php -r \"file_exists('.git/hooks/pre-commit') and rename('.git/hooks/pre-commit', '.git/hooks/pre-commit.sample');\"",
"@php -r \"file_exists('.git/hooks/post-merge') and rename('.git/hooks/post-merge', '.git/hooks/post-merge.sample');\""
],
"changelog": "conventional-changelog --ansi -v",
"changelog": "@php ./vendor/bin/conventional-changelog --ansi -v",
"changelog-major": "@changelog --major",
"changelog-minor": "@changelog --minor",
"changelog-patch": "@changelog --patch",
Expand All @@ -159,7 +160,7 @@
],
"composer-bin": "@composer bin --ansi -v",
"composer-check-platform-reqs": "@composer check-platform-reqs --lock --ansi -v",
"composer-unused-checker": "@php ./vendor/bin/composer-unused --ansi -v",
"composer-unused": "@php ./vendor/bin/composer-unused --ansi -v",
"composer-validate": "@composer validate --strict --ansi -v",
"haulable": "haulable --ansi -v",
"haulable-package": "@haulable package ./builds/ai-commit",
Expand All @@ -174,20 +175,20 @@
"md-lint": "lint-md --config .lintmdrc ./*.md ./.github/ ./docs/",
"pest": "@php ./vendor/bin/pest",
"pest-coverage": "@pest --coverage-html=./build/phpunit/ --coverage-clover=clover.xml --coverage",
"phpstan": "phpstan analyse --ansi -v",
"phpstan": "@php ./vendor/bin/phpstan analyse --ansi -v",
"phpstan-baseline": "@phpstan --generate-baseline --allow-empty-baseline",
"post-merge": [
"@composer install"
],
"psalm": "psalm",
"psalm": "@php ./vendor/bin/psalm",
"psalm-baseline": "@psalm --update-baseline",
"rector": "rector --clear-cache --ansi -v",
"rector": "@php ./vendor/bin/rector --clear-cache --ansi -v",
"rector-dry-run": "@rector --dry-run",
"style-fix": "php-cs-fixer fix --using-cache=no --config=.php-cs-fixer.php --ansi -v",
"style-fix": "@php ./vendor/bin/php-cs-fixer fix --using-cache=yes --config=.php-cs-fixer.php --ansi -v",
"style-lint": "@style-fix --diff --dry-run",
"test": "@pest",
"test-coverage": "@pest-coverage",
"var-dump-server": "var-dump-server --ansi -v",
"var-dump-server": "@php ./vendor/bin/var-dump-server --ansi -v",
"vhs": [
"@cghooks-uninstall",
"vhs < ai-commit.tape",
Expand Down
75 changes: 74 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
],

// paths
__DIR__.'/.php-cs-fixer.php',
__DIR__.'/tests/AspectMock',
'**/Fixture*',
'**/Fixture/*',
Expand Down
10 changes: 10 additions & 0 deletions vendor-bin/composer-unused/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"require-dev": {
"icanhazstring/composer-unused": "^0.7"
},
"config": {
"allow-plugins": {
"icanhazstring/composer-unused": true
}
}
}
5 changes: 5 additions & 0 deletions vendor-bin/php-conventional-changelog/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require-dev": {
"marcocesarato/php-conventional-changelog": "^1.17"
}
}

0 comments on commit c19228d

Please sign in to comment.