Development environment setup #8
This file contains hidden or 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: Tests | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ['8.4'] | |
| name: PHP ${{ matrix.php }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| tools: composer | |
| coverage: none | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.composer/cache | |
| key: composer-${{ matrix.php }}-${{ hashFiles('composer.lock') }} | |
| restore-keys: composer-${{ matrix.php }}- | |
| - name: Install dependencies | |
| run: composer install --no-interaction --no-progress | |
| - name: Run PHPStan | |
| run: vendor/bin/phpstan analyse --memory-limit=2G | |
| - name: Run tests | |
| run: vendor/bin/phpunit tests/ |