[CI] simlify jobs to matrix

This commit is contained in:
TomasVotruba 2020-07-05 11:54:05 +02:00
parent 8928593a1d
commit c16481e2f5
7 changed files with 66 additions and 110 deletions

65
.github/workflows/code_analysis.yaml vendored Normal file
View File

@ -0,0 +1,65 @@
name: Code Analysis
on:
pull_request: null
push:
branches:
- master
jobs:
matrix:
strategy:
fail-fast: false
matrix:
actions:
-
name: 'Coding Standard'
run: composer check-cs
-
name: 'PHPStan'
run: composer phpstan
-
name: Validate Fixtures
run: |
bin/rector validate-fixtures --ansi
bin/rector validate-fixture-suffix --ansi
-
name: 'Sync Annotation Parser'
run: bin/rector sync-annotation-parser --dry-run --ansi
-
name: 'Validate Services in Sets'
run: bin/rector validate-services-in-sets --ansi
-
name: 'Validate Sets Loading'
# this is very slow, so it has to be in own workflow
run: bin/rector validate-sets --ansi
-
name: 'Validate PHPStan AttributeAware Doc Types'
run: bin/rector sync-types
-
name: 'Validate PHPStan Static Type Mappers'
run: bin/rector check-static-type-mappers
name: ${{ matrix.actions.name }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# see https://github.com/shivammathur/setup-php
- uses: shivammathur/setup-php@v1
with:
php-version: 7.4
coverage: none
- run: composer install --no-progress
-
name: ${{ matrix.actions.name }}
run: ${{ matrix.actions.run }}

View File

@ -1,19 +0,0 @@
name: Coding Standards
on:
pull_request: null
push:
branches:
- master
jobs:
ecs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v1
with:
php-version: 7.2
coverage: none # disable xdebug, pcov
- run: composer install --no-progress --ansi
- run: composer check-cs

View File

@ -1,21 +0,0 @@
name: Static Analysis
on:
pull_request: null
push:
branches:
- master
jobs:
phpstan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v1
with:
php-version: 7.4
coverage: none
tools: cs2pr
- run: composer install --no-progress --ansi
# turn the phpstan errors (formatted in checkstyle-format) into github pull request check annotations
- run: composer phpstan # -- --error-format=checkstyle | cs2pr

View File

@ -1,20 +0,0 @@
name: PHPStan Compatibility Check
on:
pull_request: null
push:
branches:
- master
jobs:
phpstan_compatibility_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v1
with:
php-version: 7.2
coverage: none # disable xdebug, pcov
- run: composer install --no-progress --ansi
- run: bin/rector sync-types
- run: bin/rector check-static-type-mappers

View File

@ -1,27 +0,0 @@
name: Validate Project
on:
pull_request: null
push:
branches:
- master
jobs:
validate_project:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v1
with:
php-version: 7.4
coverage: none
- run: composer install --no-progress --ansi
- run: bin/rector validate-fixtures --ansi
- run: bin/rector validate-fixture-suffix --ansi
- run: bin/rector sync-annotation-parser --dry-run --ansi
- run: bin/rector validate-services-in-sets --ansi

View File

@ -1,22 +0,0 @@
name: Validate Sets
on:
pull_request: null
push:
branches:
- master
jobs:
validate_sets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v1
with:
php-version: 7.4
coverage: none
- run: composer install --no-progress --ansi
# this is very slow, so it has to be in own workflow
- run: bin/rector validate-sets --ansi

View File

@ -64,7 +64,7 @@ final class CheckStaticTypeMappersCommand extends AbstractCommand
$this->symfonyStyle->error('Some classes are missing nodes');
$this->symfonyStyle->listing($missingNodeClasses);
return ShellCode::SUCCESS;
return ShellCode::ERROR;
}
/**