Remove composer.lock (library) #9
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: | |
paths-ignore: | |
- 'doc/**' | |
pull_request: | |
paths-ignore: | |
- 'doc/**' | |
jobs: | |
phpstan: | |
name: PHPStan | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Setup PHP with PECL extension | |
uses: shivammathur/[email protected] | |
with: | |
php-version: 8.1 | |
tools: composer:v2 | |
coverage: none | |
- name: Validate composer.json and composer.lock | |
run: composer validate | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo 'dir=' . $(composer config cache-files-dir) >> $GITHUB_OUTPUT | |
- name: Cache Composer packages | |
uses: actions/[email protected] | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: phpstan-linux-php-8.1-${{ hashFiles('**/composer.lock') }} | |
restore-keys: phpstan-linux-php-8.1- | |
- name: Install dependencies | |
if: steps.composer-cache.outputs.cache-hit != 'true' | |
run: composer update --prefer-stable --ignore-platform-req=php --no-progress --no-interaction | |
- name: Run PHPStan | |
run: composer run-script phpstan -- --no-progress |