Update to only current+upcoming PHP versions (#46) #110
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Static analysis | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
# Run on all PRs | |
env: | |
CI: "true" | |
jobs: | |
phpstan: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v4 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.json') }} | |
restore-keys: | | |
${{ runner.os }}-php- | |
- name: Install dependencies | |
run: composer install --no-interaction --no-ansi --no-progress --no-suggest --prefer-dist --optimize-autoloader | |
- name: PHPStan | |
run: vendor/bin/phpstan analyse |