Test with highest and lowest dependency versions #47
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: Default | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php-versions: ['8.2', '8.3', '8.4'] | |
dependency-versions: [lowest, highest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP with PECL extension | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
tools: composer | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v4 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-${{ matrix.dependency-version }}-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php- | |
- name: Install composer dependencies | |
uses: ramsey/composer-install@v2 | |
with: | |
dependency-versions: ${{ matrix.dependency-versions }} | |
- name: Check coding standard | |
run: vendor/bin/phpcs -p | |
- name: Analyze with PHPStan | |
run: vendor/bin/phpstan analyse | |
- name: Execute PHPUnit tests | |
run: vendor/bin/phpunit |