diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a222e79..eac41f6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -68,7 +68,7 @@ jobs: continue-on-error: true test: - name: Test (PHP ${{ matrix.php-version }}) + name: Test (PHP ${{ matrix.php-version }}, Illuminate ${{ matrix.illuminate }}) runs-on: ubuntu-latest needs: [lint] @@ -76,6 +76,7 @@ jobs: fail-fast: false matrix: php-version: ["8.2", "8.3", "8.4"] + illuminate: ["^11.0", "^12.0"] steps: - name: Checkout @@ -92,17 +93,19 @@ jobs: uses: actions/cache@v4 with: path: ~/.composer/cache - key: php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: php-${{ matrix.php-version }}-composer- + key: php-${{ matrix.php-version }}-illuminate-${{ matrix.illuminate }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: php-${{ matrix.php-version }}-illuminate-${{ matrix.illuminate }}-composer- - name: Install dependencies - run: composer install --prefer-dist --no-progress + run: | + composer require "illuminate/collections:${{ matrix.illuminate }}" --no-update + composer install --prefer-dist --no-progress - name: Run tests run: composer test - name: Upload coverage artifact - if: matrix.php-version == '8.4' + if: matrix.php-version == '8.4' && matrix.illuminate == '^12.0' uses: actions/upload-artifact@v4 with: name: coverage-report diff --git a/composer.json b/composer.json index 9534145..ac24b31 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "ext-json": "*", "ramsey/uuid": "^4.1.0", "nesbot/carbon": "^3.2.0", - "illuminate/collections": "^11.0.0", + "illuminate/collections": "^11.0.0 || ^12.0.0", "lambdish/phunctional": "^2.1.0", "doctrine/instantiator": "^2.0.0", "complex-heart/contracts": "^3.0.0" diff --git a/phpunit.xml b/phpunit.xml index e266abd..2fdd270 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -2,13 +2,8 @@ - - - - - ./tests