diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 9064002..47e8375 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -7,44 +7,70 @@ on: jobs: tests: runs-on: ubuntu-latest + strategy: fail-fast: false matrix: - php: [7.4, 8.0, 8.1, 8.2] - laravel: [6.*, 7.*, 8.*, 9.*, 10.*] + php: [7.4, 8.0, 8.1, 8.2, 8.3] + laravel: ['6.*', '7.*', '8.*', '9.*', '10.*', '11.*'] exclude: - # excludes unsupported combinations + - php: 7.4 + laravel: 11.* - php: 8.0 - laravel: 10.* + laravel: 11.* + - php: 8.1 + laravel: 11.* - php: 7.4 laravel: 10.* + - php: 8.0 + laravel: 10.* - php: 7.4 laravel: 9.* - - php: 8.1 - laravel: 6.* + - php: 8.3 + laravel: 9.* + - php: 8.2 + laravel: 8.* + - php: 8.3 + laravel: 8.* - php: 8.1 laravel: 7.* - php: 8.2 + laravel: 7.* + - php: 8.3 + laravel: 7.* + - php: 8.1 laravel: 6.* - php: 8.2 - laravel: 7.* + laravel: 6.* + - php: 8.3 + laravel: 6.* name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} extensions: dom, curl, libxml, mbstring, zip, json - coverage: none + coverage: pcov - name: Install dependencies run: | composer require "illuminate/contracts=${{ matrix.laravel }}" --no-update composer update --prefer-dist --no-interaction --no-progress - - name: Execute tests - run: vendor/bin/phpunit --verbose --configuration=phpunit.xml.dist + + - name: Grab PHPUnit version + id: phpunit_version + run: echo "VERSION=$(vendor/bin/phpunit --version | grep --only-matching --max-count=1 --extended-regexp '\b[0-9]+\.[0-9]+')" >> $GITHUB_OUTPUT + + - name: Execute tests (PHPUnit 10) + if: ${{ startsWith(steps.phpunit_version.outputs.VERSION, '10.') }} + run: vendor/bin/phpunit --configuration=phpunit10.xml.dist + + - name: Execute tests (PHPUnit < 10) + if: ${{ !startsWith(steps.phpunit_version.outputs.VERSION, '10.') }} + run: vendor/bin/phpunit --configuration=phpunit.xml.dist diff --git a/.gitignore b/.gitignore index 955d297..61aa4f9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ composer.lock .idea build .phpunit.result.cache +.phpunit.cache \ No newline at end of file diff --git a/composer.json b/composer.json index 8f183a2..aa0957b 100644 --- a/composer.json +++ b/composer.json @@ -17,20 +17,20 @@ "require": { "php": ">=7.4|^8.0", "guzzlehttp/guzzle": "^7.0", - "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/bus": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/mail": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/queue": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/notifications": "^6.0|^7.0|^8.0|^9.0|^10.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/bus": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/mail": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/queue": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/notifications": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", "ext-json": "*", - "enlightn/security-checker": "^1.3" + "enlightn/security-checker": "^1.3|^2.0" }, "require-dev": { - "laravel/slack-notification-channel": "^1.0|^2.0", - "phpunit/phpunit": "^6.0|^7.0|^8.0|^9.0", + "laravel/slack-notification-channel": "^1.0|^2.0|^3.2", + "phpunit/phpunit": "^6.0|^7.0|^8.0|^9.0|^10.5", "squizlabs/php_codesniffer": "~2.3|^3.6", - "orchestra/testbench": "^4.0|^5.0|^6.0|^7.0|^8.0", + "orchestra/testbench": "^4.0|^5.0|^6.0|^7.0|^8.0|^9.0", "mockery/mockery": "^1.2" }, "suggest": { diff --git a/phpunit10.xml.dist b/phpunit10.xml.dist new file mode 100644 index 0000000..36eabd9 --- /dev/null +++ b/phpunit10.xml.dist @@ -0,0 +1,27 @@ + + + + + tests + + + + + + + + + + + + + + + ./src + + + \ No newline at end of file