Skip to content

Cleanup GitHub workflows #1890

Cleanup GitHub workflows

Cleanup GitHub workflows #1890

Workflow file for this run

name: static analysis
on:
pull_request:
paths: &paths
- 'public/**'
- 'src/**'
- 'config/**'
- 'psalm.xml'
- 'composer.json'
- 'yii'
- 'yii.bat'
- '.github/workflows/static.yml'
push:
branches: ['master']
paths: *paths
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
psalm:
name: PHP ${{ matrix.php }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
php:
- "8.2"
- "8.3"
- "8.4"
- "8.5"
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install PHP with extensions
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
coverage: none
php-version: ${{ matrix.php }}
tools: composer:v2, cs2pr
- name: Install Composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
- name: Static analysis
env:
PHP_VERSION: ${{ matrix.php }}
run: vendor/bin/psalm --shepherd --stats --output-format=checkstyle --no-cache --php-version="${PHP_VERSION}" | cs2pr --graceful-warnings --colorize