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 c06147f
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 15 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
11 changes: 6 additions & 5 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 Down Expand Up @@ -174,16 +175,16 @@
"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",
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.

0 comments on commit c06147f

Please sign in to comment.