diff --git a/.github/workflows/phpunit.yml b/.github/workflows/laravel-6.yml similarity index 63% rename from .github/workflows/phpunit.yml rename to .github/workflows/laravel-6.yml index 7076522..2dcc591 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/laravel-6.yml @@ -1,17 +1,17 @@ -name: phpunit +name: "Laravel 6" on: [ push ] jobs: - build: + phpunit: runs-on: ubuntu-latest strategy: fail-fast: true matrix: php: [ "7.3", "7.4", "8.0" ] - laravel: [ "6.0", "7.0", "8.0" ] + laravel: [ "6.0" ] - name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }} + name: PHP ${{ matrix.php }} steps: - name: Checkout code @@ -21,13 +21,11 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv, bcmath + extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv coverage: none - name: Install dependencies - run: | - composer require --dev laravel/framework:^${{ matrix.laravel }} - composer update --prefer-stable --prefer-dist --no-progress --no-interaction + run: composer require laravel/framework:^${{ matrix.laravel }} - name: Execute tests run: sudo vendor/bin/phpunit diff --git a/.github/workflows/laravel-7.yml b/.github/workflows/laravel-7.yml new file mode 100644 index 0000000..56fdde0 --- /dev/null +++ b/.github/workflows/laravel-7.yml @@ -0,0 +1,31 @@ +name: "Laravel 7" +on: [ push ] + +jobs: + phpunit: + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + php: [ "7.3", "7.4", "8.0" ] + laravel: [ "7.0" ] + + name: PHP ${{ matrix.php }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv + coverage: none + + - name: Install dependencies + run: composer require laravel/framework:^${{ matrix.laravel }} + + - name: Execute tests + run: sudo vendor/bin/phpunit diff --git a/.github/workflows/laravel-8.yml b/.github/workflows/laravel-8.yml new file mode 100644 index 0000000..e3b7df6 --- /dev/null +++ b/.github/workflows/laravel-8.yml @@ -0,0 +1,31 @@ +name: "Laravel 8" +on: [ push ] + +jobs: + phpunit: + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + php: [ "7.3", "7.4", "8.0", "8.1" ] + laravel: [ "8.0" ] + + name: PHP ${{ matrix.php }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv + coverage: none + + - name: Install dependencies + run: composer require laravel/framework:^${{ matrix.laravel }} + + - name: Execute tests + run: sudo vendor/bin/phpunit diff --git a/.github/workflows/laravel-9.yml b/.github/workflows/laravel-9.yml new file mode 100644 index 0000000..2b0d426 --- /dev/null +++ b/.github/workflows/laravel-9.yml @@ -0,0 +1,31 @@ +name: "Laravel 9" +on: [ push ] + +jobs: + phpunit: + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + php: [ "8.0", "8.1" ] + laravel: [ "9.0" ] + + name: PHP ${{ matrix.php }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv + coverage: none + + - name: Install dependencies + run: composer require laravel/framework:^${{ matrix.laravel }} + + - name: Execute tests + run: sudo vendor/bin/phpunit diff --git a/composer.json b/composer.json index 773cb75..c015635 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { "name": "dragon-code/laravel-json-response", "description": "Automatically always return a response in JSON format", - "type": "library", "license": "MIT", + "type": "library", "keywords": [ "api", "json", @@ -23,18 +23,20 @@ "source": "https://github.com/TheDragonCode/laravel-json-response" }, "require": { - "php": "^7.3|^8.0", - "illuminate/contracts": "^6.0|^7.0|^8.0", - "illuminate/http": "^6.0|^7.0|^8.0", - "illuminate/support": "^6.0|^7.0|^8.0" + "php": "^7.3 || ^8.0", + "illuminate/contracts": "^6.0 || ^7.0 || ^8.0 || ^9.0", + "illuminate/http": "^6.0 || ^7.0 || ^8.0 || ^9.0", + "illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0" }, "require-dev": { - "orchestra/testbench": "^4.0|^5.0|^6.0", + "orchestra/testbench": "^4.0 || ^5.0 || ^6.0 || ^7.0", "phpunit/phpunit": "^9.0" }, "conflict": { "andrey-helldar/laravel-json-response": "*" }, + "minimum-stability": "stable", + "prefer-stable": true, "autoload": { "psr-4": { "DragonCode\\LaravelJsonResponse\\": "src" @@ -48,7 +50,5 @@ "config": { "preferred-install": "dist", "sort-packages": true - }, - "minimum-stability": "stable", - "prefer-stable": true + } }