Skip to content

Commit

Permalink
Add a matrix for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
bennett-treptow committed Apr 5, 2024
1 parent 313ebc7 commit a71b760
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:

jobs:
build:
strategy:
matrix:
php: ['7.4', '8.0', '8.1']
runs-on: ubuntu-latest

steps:
Expand All @@ -16,7 +19,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: ${{ matrix.php }}

- name: Cache Composer packages
id: composer-cache
Expand All @@ -27,11 +30,14 @@ jobs:
restore-keys: |
${{ runner.os }}-php-
- name: Remove pint if not PHP 8.1
run: |
if [ ${{ matrix.php }} != '8.1' ]; then
composer remove laravel/pint --dev
fi
- name: Install dependencies
run: composer install --prefer-dist --no-progress

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

- name: Run test suite
run: composer run test

0 comments on commit a71b760

Please sign in to comment.