Skip to content

Merge pull request #74 from inpsyde/3.x-proposal #50

Merge pull request #74 from inpsyde/3.x-proposal

Merge pull request #74 from inpsyde/3.x-proposal #50

name: PHP Static Code Analysis
on:
push:
paths:
- '**workflows/php-static-analysis.yml'
- '**.php'
- '**phpcs.xml.dist'
- '**psalm.xml'
- '**composer.json'
pull_request:
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'
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 all') || (github.event.inputs.jobs == 'Run lint only')) }}
with:
PHP_MATRIX: '["8.1", "8.2"]'

Check failure on line 34 in .github/workflows/php-static-analysis.yml

View workflow run for this annotation

GitHub Actions / PHP Static Code Analysis

Invalid workflow file

The workflow is not valid. .github/workflows/php-static-analysis.yml (Line: 34, Col: 25): Invalid input, PHP_MATRIX is not defined in the referenced workflow.
coding-standards-analysis-php:
if: ${{ (github.event_name != 'workflow_dispatch') || ((github.event.inputs.jobs == 'Run all') || (github.event.inputs.jobs == 'Run PHPCS only')) }}
uses: inpsyde/reusable-workflows/.github/workflows/coding-standards-php.yml@main
with:
PHP_VERSION: '8.1'
static-code-analysis-php:
if: ${{ (github.event_name != 'workflow_dispatch') || ((github.event.inputs.jobs == 'Run all') || (github.event.inputs.jobs == 'Run Psalm only')) }}
uses: inpsyde/reusable-workflows/.github/workflows/static-analysis-php.yml@main
strategy:
matrix:
php-version: [ '8.1', '8.2' ]
with:
PHP_VERSION: ${{ matrix.php-version }}