From 854b115dff91529e708ad0125c312fd3e2796e18 Mon Sep 17 00:00:00 2001 From: robbieaverill Date: Sun, 29 Sep 2024 19:03:32 -0700 Subject: [PATCH] Add PHP version matrix to GitHub Actions --- .github/workflows/php.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 8626a8d..2703926 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -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 @@ -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