Fix regression in recent merge #161
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PHP Quality Assurance | |
on: | |
push: | |
paths: | |
- '**workflows/php-qa.yml' | |
- '**.php' | |
- '**phpcs.xml.dist' | |
- '**phpunit.xml.dist' | |
- '**psalm.xml' | |
- '**composer.json' | |
pull_request: | |
paths: | |
- '**workflows/php-qa.yml' | |
- '**.php' | |
- '**phpcs.xml.dist' | |
- '**phpunit.xml.dist' | |
- '**psalm.xml' | |
- '**composer.json' | |
workflow_dispatch: | |
inputs: | |
jobs: | |
required: true | |
type: choice | |
default: 'Run all' | |
description: 'Choose jobs to run' | |
options: | |
- 'Run all' | |
- 'Run PHPCS only' | |
- 'Run Psalm only' | |
- 'Run lint only' | |
- 'Run static analysis (PHPCS + Psalm + lint)' | |
- 'Run unit tests only' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint-php: | |
uses: inpsyde/reusable-workflows/.github/workflows/lint-php.yml@main | |
if: ${{ (github.event_name != 'workflow_dispatch') || ((github.event.inputs.jobs != 'Run PHPCS only') && (github.event.inputs.jobs != 'Run Psalm only') && (github.event.inputs.jobs != 'Run unit tests only')) }} | |
strategy: | |
matrix: | |
php: ['7.2', '7.3', '7.4', '8.0'] | |
with: | |
PHP_VERSION: ${{ matrix.php }} | |
coding-standards-analysis-php: | |
if: ${{ (github.event_name != 'workflow_dispatch') || ((github.event.inputs.jobs != 'Run lint only') && (github.event.inputs.jobs != 'Run Psalm only') && (github.event.inputs.jobs != 'Run unit tests only')) }} | |
uses: inpsyde/reusable-workflows/.github/workflows/coding-standards-php.yml@main | |
with: | |
PHP_VERSION: '7.4' | |
static-code-analysis-php: | |
if: ${{ (github.event_name != 'workflow_dispatch') || ((github.event.inputs.jobs != 'Run PHPCS only') && (github.event.inputs.jobs != 'Run lint only') && (github.event.inputs.jobs != 'Run unit tests only')) }} | |
uses: inpsyde/reusable-workflows/.github/workflows/static-analysis-php.yml@main | |
strategy: | |
matrix: | |
php: ['7.2', '7.3', '7.4', '8.0'] | |
with: | |
PHP_VERSION: ${{ matrix.php }} | |
PSALM_ARGS: '--no-suggestions --report-show-info=false --find-unused-psalm-suppress --no-diff --no-cache --no-file-cache --long-progress' | |
tests-unit-php: | |
if: ${{ (github.event_name != 'workflow_dispatch') || ((github.event.inputs.jobs == 'Run all') || (github.event.inputs.jobs == 'Run unit tests only')) }} | |
uses: inpsyde/reusable-workflows/.github/workflows/tests-unit-php.yml@main | |
strategy: | |
matrix: | |
php: ['7.2', '7.3', '7.4', '8.0'] | |
with: | |
PHP_VERSION: ${{ matrix.php }} | |
PHPUNIT_ARGS: '--no-coverage' |