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
102 changes: 33 additions & 69 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ name: run-tests

on:
push:
branches: [master]
branches:
- master
pull_request:
branches: [master]

branches:
- master

jobs:
php-tests:
Expand All @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down