Skip to content

Commit

Permalink
[CI] use tools from shivammathur/setup-php (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyholm authored May 18, 2021
1 parent cb21762 commit 6d3bdee
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 62 deletions.
49 changes: 17 additions & 32 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
phpstan:
name: PHPStan
runs-on: Ubuntu-20.04
runs-on: ubuntu-20.04

steps:
- name: Checkout code
Expand All @@ -22,23 +22,19 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: 8.0
coverage: none
tools: phpstan:0.12.88, cs2pr

- name: Download dependencies
uses: ramsey/composer-install@v1
with:
composer-options: --no-interaction --prefer-dist --optimize-autoloader

- name: Download PHPStan
run: composer bin phpstan update --no-interaction --no-progress

- name: Execute PHPStan
run: vendor/bin/phpstan analyze --no-progress
- name: PHPStan
run: phpstan analyze --no-progress --error-format=checkstyle | cs2pr

php-cs-fixer:
name: PHP-CS-Fixer
runs-on: Ubuntu-20.04
runs-on: ubuntu-20.04

steps:
- name: Checkout code
Expand All @@ -54,23 +50,16 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: 8.0
coverage: none
tools: php-cs-fixer:2.19.0, cs2pr

- name: Download dependencies
uses: ramsey/composer-install@v1
with:
composer-options: --no-interaction --prefer-dist --optimize-autoloader

- name: Download PHP CS Fixer
run: composer bin php-cs-fixer update --no-interaction --no-progress

- name: Execute PHP CS Fixer
run: vendor/bin/php-cs-fixer fix --diff-format udiff --dry-run
- name: PHP-CS-Fixer
run: php-cs-fixer fix --dry-run --format=checkstyle | cs2pr

psalm:
name: Psalm
runs-on: Ubuntu-20.04
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -85,26 +74,22 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: 8.0
coverage: none
tools: vimeo/psalm:4.7.2

- name: Download dependencies
uses: ramsey/composer-install@v1
with:
composer-options: --no-interaction --prefer-dist --optimize-autoloader

- name: Download Psalm
run: composer bin psalm update --no-interaction --no-progress

- name: Execute Psalm
run: vendor/bin/psalm.phar --no-progress --output-format=github
- name: Psalm
run: psalm --no-progress --output-format=github

composer-normalize:
name: Composer Normalize
runs-on: Ubuntu-20.04
runs-on: ubuntu-20.04

steps:
- name: Set up PHP
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
.php_cs.cache
.phpunit.result.cache
composer.lock
/vendor-bin/
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"symfony/runtime": "^5.3"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4",
"illuminate/http": "^8.33",
"swoole/ide-helper": "^4.6"
},
Expand Down
9 changes: 0 additions & 9 deletions vendor-bin/php-cs-fixer/composer.json

This file was deleted.

10 changes: 0 additions & 10 deletions vendor-bin/phpstan/composer.json

This file was deleted.

9 changes: 0 additions & 9 deletions vendor-bin/psalm/composer.json

This file was deleted.

0 comments on commit 6d3bdee

Please sign in to comment.