Add PHP 8.3 to build matrix #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: Build and Test | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
versions: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP ${{ matrix.versions }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.versions }} | |
- name: Validate composer.json | |
run: composer validate | |
- name: Add caching for Composer packages | |
uses: actions/cache/restore@v3 | |
id: composer-restore | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }} | |
- name: Install dependencies | |
if: steps.composer-cache.outputs.cache-hit != 'true' | |
run: composer install --prefer-dist --no-progress | |
- name: Run test suite | |
run: ./vendor/bin/phpunit |