Skip to content

Move the static analysis and CS jobs to a separate GitHub Actions workflow #403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Code style and static analysis

on:
pull_request:
push:
branches:
- master
- 3.5.x

jobs:
php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'

- name: Install dependencies
run: composer update --no-progress --no-interaction --prefer-dist

- name: Run script
run: composer phpcs

phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2

- name: Install dependencies
run: composer update --no-progress --no-interaction --prefer-dist

- name: Run script
run: composer phpstan
28 changes: 0 additions & 28 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,31 +65,3 @@ jobs:
with:
file: './coverage.xml'
fail_ci_if_error: true
PHP-CS-Fixer:
runs-on: ubuntu-latest
name: Code style
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: '7.4'
- uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- run: composer install --no-progress --ansi
- run: vendor/bin/php-cs-fixer fix --ansi --verbose --dry-run
PHPStan:
runs-on: ubuntu-latest
name: PHPStan
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: '7.4'
- uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- run: composer install --no-progress --ansi
- run: vendor/bin/phpstan analyse
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"symfony/security-core": "^3.4||^4.0||^5.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.16",
"friendsofphp/php-cs-fixer": "^2.17",
"jangregor/phpstan-prophecy": "^0.8",
"monolog/monolog": "^1.3||^2.0",
"phpspec/prophecy": "!=1.11.0",
Expand Down