Update all non-major dependencies #547
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: Build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
dependencies: [lowest, highest] | |
php-versions: | |
- 8.1 | |
- 8.2 | |
- 8.3 | |
name: PHP ${{ matrix.php-versions }} checks with ${{ matrix.dependencies }} dependencies | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
coverage: xdebug | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: php-${{ matrix.php-versions }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }} | |
restore-keys: "php-${{ matrix.php-versions }}-composer-${{ matrix.dependencies }}-" | |
- name: Install lowest dependencies | |
if: ${{ matrix.dependencies == 'lowest' }} | |
run: composer update --prefer-lowest --prefer-dist --no-progress --no-suggest --no-interaction | |
- name: Install highest dependencies | |
if: ${{ matrix.dependencies == 'highest' }} | |
run: composer update --prefer-dist --no-progress --no-suggest --no-interaction | |
- name: Run checks | |
run: make check |