diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 297d8fd..38f4901 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,10 +2,11 @@ name: run-tests on: push: - branches: [master] + branches: + - master pull_request: - branches: [master] - + branches: + - master jobs: php-tests: @@ -14,66 +15,37 @@ jobs: strategy: fail-fast: false matrix: - php: - - '8.3' - - '8.2' - - '8.1' - - '8.0' - laravel: - - '10.*' - - '9.*' - - '8.*' - dependency-version: - - 'prefer-stable' - + php: ['8.4', '8.3', '8.2', '8.1', '8.0'] + laravel: ['8.*', '9.*', '10.*', '11.*', '12.*'] + dependency-version: [prefer-stable] exclude: - - laravel: '11.*' - php: '8.2' - - laravel: '11.*' - php: '8.1' - - laravel: '11.*' - php: '8.0' - - laravel: '10.*' - php: '8.0' - - + - php: 8.0 + laravel: 10.* + - php: 8.0 + laravel: 11.* + - php: 8.0 + laravel: 12.* + - php: 8.1 + laravel: 11.* + - php: 8.1 + laravel: 12.* + - php: 8.2 + laravel: 8.* + - php: 8.3 + laravel: 8.* + - php: 8.4 + laravel: 8.* include: - - laravel: '11.*' - php: '8.3' - testbench: '9.*' - - laravel: '10.*' - php: '8.3' - testbench: '8.*' - - laravel: '10.*' - php: '8.2' - testbench: '8.*' - - laravel: '10.*' - php: '8.1' - testbench: '8.*' - - laravel: '9.*' - php: '8.3' - testbench: '7.*' - - laravel: '9.*' - php: '8.2' - testbench: '7.*' - - laravel: '9.*' - php: '8.1' - testbench: '7.*' - - laravel: '9.*' - php: '8.0' - testbench: '7.*' - - laravel: '8.*' - php: '8.3' - testbench: '6.*' - - laravel: '8.*' - php: '8.2' - testbench: '6.*' - - laravel: '8.*' - php: '8.1' - testbench: '6.*' - - laravel: '8.*' - php: '8.0' - testbench: '6.*' + - laravel: 8.* + testbench: 6.23 + - laravel: 9.* + testbench: 7.* + - laravel: 10.* + testbench: 8.* + - laravel: 11.* + testbench: 9.* + - laravel: 12.* + testbench: 10.* name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ubuntu-latest @@ -90,17 +62,9 @@ jobs: coverage: none - name: Install dependencies - if: matrix.laravel != '11.*' || matrix.php != '8.3' run: | composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction - - name: Install dependencies - if: matrix.laravel == '11.*' && matrix.php == '8.3' - run: | - composer require "laravel/framework:11.*" "orchestra/testbench:9.*" --no-interaction --no-update --dev - composer update --prefer-stable --prefer-dist --no-interaction - - - name: Execute tests run: vendor/bin/phpunit diff --git a/README.md b/README.md index c1c7ada..e4f520e 100644 --- a/README.md +++ b/README.md @@ -251,7 +251,7 @@ All generated vouchers can only be redeemed once. If a user tries to redeem a vo If a user tries to redeem an expired voucher code, the package will throw the following exception: `BeyondCode\Vouchers\Exceptions\VoucherExpired`. -### Testing +## Testing ``` bash composer test diff --git a/composer.json b/composer.json index ddcc34d..beb79a7 100644 --- a/composer.json +++ b/composer.json @@ -17,14 +17,14 @@ ], "require": { "php": "^7.1|^8.0", - "illuminate/config": "^8.0|^9.0|^10.0|^11.0", - "illuminate/database": "^8.0|^9.0|^10.0|^11.0", - "illuminate/support": "^8.0|^9.0|^10.0|^11.0" + "illuminate/config": "^8.0|^9.0|^10.0|^11.0|^12.0", + "illuminate/database": "^8.0|^9.0|^10.0|^11.0|^12.0", + "illuminate/support": "^8.0|^9.0|^10.0|^11.0|^12.0" }, "require-dev": { "mockery/mockery": "^1.4", - "phpunit/phpunit": "^8.0|^9.0|^10.0", - "orchestra/testbench": "^6.0|^8.0|^9.0" + "phpunit/phpunit": "^8.0|^9.0|^10.0|^11.5.3", + "orchestra/testbench": "^6.0|^8.0|^9.0|^10.0" }, "autoload": { "psr-4": {