Update phpstan/phpstan requirement from ^1.12 to ^1.12 || ^2.0 #4
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: PHP type checking and unit testing | |
on: | |
push: | |
branches: [ master ] | |
pull_request: {} | |
jobs: | |
build: | |
strategy: | |
matrix: | |
php-versions: ['8.2', '8.3'] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: mbstring, intl, json | |
coverage: pcov | |
- name: Validate composer.json and composer.lock | |
run: composer validate | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress --no-suggest | |
- name: Run unit tests | |
run: ./vendor/bin/phpunit --testdox | |
- name: Run type checker | |
run: ./vendor/bin/phpstan analyse src |