Improve types #179
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: | |
- main | |
pull_request: | |
jobs: | |
phpstan: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: [ 8.3 ] | |
release: [ stable ] | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Cache Composer dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/composer/files | |
key: php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} | |
- name: Install dependencies | |
run: | | |
docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm php${{ matrix.php }} \ | |
composer update --no-interaction --no-progress --prefer-dist --prefer-${{ matrix.release }} | |
- name: Analyse code | |
run: | | |
docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm php${{ matrix.php }} \ | |
vendor/bin/phpstan analyse --error-format=github --memory-limit=-1 | |
- name: Analyse types | |
run: | | |
docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm php${{ matrix.php }} \ | |
vendor/bin/phpstan analyse --configuration=phpstan.types.neon.dist --error-format=github --memory-limit=-1 |