add phpstan to GH actions #3
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: PHPUnit | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-versions: ['8.1', '8.2', '8.3'] | |
steps: | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
- uses: actions/checkout@v4 | |
- name: Update composer dependencies for PHP 8.1 | |
if: matrix.php-versions == '8.1' | |
run: composer update --with-all-dependencies | |
- name: Install Dependencies | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- name: Execute tests PHPUnit tests | |
run: ./vendor/bin/phpunit tests |