Skip to content

Remove lie text from each file, rename leftover of Inpsyde #80

Remove lie text from each file, rename leftover of Inpsyde

Remove lie text from each file, rename leftover of Inpsyde #80

name: PHP Quality Assurance
on:
push:
paths:
- '**workflows/quality-assurance-php.yml'
- '**.php'
- '**phpcs.xml.dist'
- '**phpunit.xml.dist'
- '**psalm.xml'
- '**ruleset.xml'
- '**composer.json'
pull_request:
paths:
- '**workflows/quality-assurance-php.yml'
- '**.php'
- '**phpcs.xml.dist'
- '**phpunit.xml.dist'
- '**psalm.xml'
- '**ruleset.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'
- 'Run unit tests only'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-php:
if: ${{ (github.event_name != 'workflow_dispatch') || ((github.event.inputs.jobs == 'Run all') || (github.event.inputs.jobs == 'Run lint only') || (github.event.inputs.jobs == 'Run static analysis')) }}
uses: inpsyde/reusable-workflows/.github/workflows/lint-php.yml@main
strategy:
matrix:
php-ver: [ '7.4', '8.0', '8.1', '8.2' ]
with:
PHP_VERSION: ${{ matrix.php-ver }}
LINT_ARGS: '-e php --colors --show-deprecated ./Inpsyde'
coding-standards-analysis-php:
if: ${{ (github.event_name != 'workflow_dispatch') || ((github.event.inputs.jobs == 'Run all') || (github.event.inputs.jobs == 'Run PHPCS only') || (github.event.inputs.jobs == 'Run static analysis')) }}
uses: inpsyde/reusable-workflows/.github/workflows/coding-standards-php.yml@main
static-code-analysis-php:
if: ${{ (github.event_name != 'workflow_dispatch') || ((github.event.inputs.jobs == 'Run all') || (github.event.inputs.jobs == 'Run Psalm only') || (github.event.inputs.jobs == 'Run static analysis')) }}
uses: inpsyde/reusable-workflows/.github/workflows/static-analysis-php.yml@main
strategy:
matrix:
php-ver: [ '7.4', '8.0', '8.1', '8.2' ]
with:
PHP_VERSION: ${{ matrix.php-ver }}
PSALM_ARGS: ${{ format('--no-suggestions --report-show-info=false --find-unused-psalm-suppress --no-diff --output-format={0}', ((github.event_name == 'pull_request') && 'github') || 'compact') }}
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-ver: [ '7.4', '8.0', '8.1', '8.2' ]
with:
PHP_VERSION: ${{ matrix.php-ver }}
PHPUNIT_ARGS: '--no-coverage'