Skip to content

Commit

Permalink
Add PHP version matrix to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
robbieaverill authored Sep 30, 2024
1 parent 99fcb4b commit 854b115
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,22 @@ permissions:

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set PHP version
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}

- name: Check PHP version
run: php -v

- name: Validate composer.json and composer.lock
run: composer validate --strict
Expand All @@ -32,8 +43,5 @@ jobs:
- 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 test

0 comments on commit 854b115

Please sign in to comment.