Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,15 @@ 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]

strategy:
fail-fast: false
matrix:
php-version: ["8.2", "8.3", "8.4"]
illuminate: ["^11.0", "^12.0"]

steps:
- name: Checkout
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 1 addition & 6 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="vendor/autoload.php"
colors="true"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd"
cacheDirectory=".phpunit.cache">
<coverage>
<report>
<clover outputFile="./coverage.xml"/>
</report>
</coverage>
<testsuites>
<testsuite name="unit">
<directory>./tests</directory>
Expand Down
Loading