diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index eaf0932..f1f09c4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,9 +2,13 @@ name: Tests on: push: - branches: [ main, develop ] + branches: + - main + - develop pull_request: - branches: [ main, develop ] + branches: + - main + - develop jobs: build: @@ -14,31 +18,38 @@ jobs: strategy: fail-fast: true matrix: - php: [8.2, 8.3, 8.4] - core: ['4.3.2', '5.0.1'] + php: [ 8.2, 8.3, 8.4 ] + core: [ '4.3.2', '5.2' ] + laravel: [ 11, 12 ] + exclude: + - laravel: 12 + core: '4.3.2' steps: - - name: Checkout Code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip - tools: composer:v2 - coverage: none - ini-values: error_reporting=E_ALL - - - name: Set Laravel JSON:API Core Version - run: composer require "laravel-json-api/core:^${{ matrix.core }}" --no-update - - - name: Install dependencies - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer update --prefer-dist --no-interaction --no-progress - - - name: Execute tests - run: vendor/bin/phpunit + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip + tools: composer:v2 + coverage: none + ini-values: error_reporting=E_ALL + + - name: Set Laravel JSON:API Core Version + run: composer require "laravel-json-api/core:^${{ matrix.core }}" --no-update + + - name: Set Laravel Version + run: composer require "illuminate/contracts:^${{ matrix.laravel }}" --no-update + + - name: Install dependencies + uses: nick-fields/retry@v3 + with: + timeout_minutes: 5 + max_attempts: 5 + command: composer update --prefer-dist --no-interaction --no-progress + + - name: Execute tests + run: vendor/bin/phpunit diff --git a/composer.json b/composer.json index bee80fd..7eaaed4 100644 --- a/composer.json +++ b/composer.json @@ -25,15 +25,15 @@ "require": { "php": "^8.2", "ext-json": "*", - "illuminate/contracts": "^11.0", - "illuminate/pipeline": "^11.0", - "laravel-json-api/core": "^4.3.2|^5.0.1", + "illuminate/contracts": "^11.0|^12.0", + "illuminate/pipeline": "^11.0|^12.0", + "laravel-json-api/core": "^4.3.2|^5.2", "laravel-json-api/validation": "^4.2" }, "require-dev": { - "laravel-json-api/testing": "^3.0", - "orchestra/testbench": "^9.0", - "phpunit/phpunit": "^10.5" + "laravel-json-api/testing": "^3.1", + "orchestra/testbench": "^9.0|^10.0", + "phpunit/phpunit": "^10.5|^11.5.3" }, "autoload": { "psr-4": { @@ -50,7 +50,7 @@ "dev-develop": "3.x-dev" } }, - "minimum-stability": "stable", + "minimum-stability": "dev", "prefer-stable": true, "config": { "sort-packages": true