Skip to content

Year in MIT license file is needed, aftr all #13

Year in MIT license file is needed, aftr all

Year in MIT license file is needed, aftr all #13

name: PHP Static Analysis
on:
push:
paths:
- '**workflows/php-static-analysis.yml'
- '**.php'
- '**phpcs.xml.dist'
- '**psalm.xml'
- '**composer.json'
pull_request:
paths:
- '**workflows/php-static-analysis.yml'
- '**.php'
- '**phpcs.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 lint only'
- 'Run PHPCS only'
- 'Run Psalm 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 lint only') || (github.event.inputs.jobs == 'Run all')) }}
strategy:
matrix:
php: [ '8.0', '8.1', '8.2', '8.3' ]
with:
PHP_VERSION: ${{ matrix.php }}
coding-standards-analysis-php:
if: ${{ (github.event_name != 'workflow_dispatch') || ((github.event.inputs.jobs == 'Run PHPCS only') || (github.event.inputs.jobs == 'Run all')) }}
uses: inpsyde/reusable-workflows/.github/workflows/coding-standards-php.yml@main
with:
PHP_VERSION: '8.0'
static-code-analysis-php:
if: ${{ (github.event_name != 'workflow_dispatch') || ((github.event.inputs.jobs == 'Run Psalm only') || (github.event.inputs.jobs == 'Run all')) }}
uses: inpsyde/reusable-workflows/.github/workflows/static-analysis-php.yml@main
strategy:
matrix:
php: [ '8.0', '8.1', '8.2', '8.3' ]
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'