Skip to content

Merge pull request #185 from bizley/dependabot/github_actions/actions… #149

Merge pull request #185 from bizley/dependabot/github_actions/actions…

Merge pull request #185 from bizley/dependabot/github_actions/actions… #149

Workflow file for this run

name: Static Analysis
on:
pull_request:
push:
branches:
- "master"
jobs:
PHPStan:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.1']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, intl
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
update: true
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer update $DEFAULT_COMPOSER_FLAGS
- name: PHPStan tests
run: vendor/bin/phpstan analyze -l 8 -a vendor/yiisoft/yii2/Yii.php --no-progress src