diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b01c6ba..694a44a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,47 +3,89 @@ name: Tests on: push: branches: - - master - pull_request: - branches: - - "*" + - "**" + pull_request: + branches: [main] jobs: run-tests: - runs-on: ubuntu-latest - timeout-minutes: 15 - env: - COMPOSER_NO_INTERACTION: 1 - + runs-on: ${{ matrix.os }} + strategy: - fail-fast: false matrix: - php: [8.1, 8.0] - laravel: [9.*, 8.*] - dependency-version: [prefer-lowest, prefer-stable] + php: [7.2, 7.3, 7.4, '8.0', 8.1, 8.2] + laravel: [6.*, 7.*, 8.*, 9.*, 10.*] + os: [ubuntu-latest] include: + - laravel: 10.* + testbench: 8.* - laravel: 9.* testbench: 7.* - laravel: 8.* - testbench: ^6.23 + testbench: 6.* + - laravel: 7.* + testbench: 5.* + - laravel: 6.* + testbench: 4.* + + exclude: + - laravel: 6.* + php: 7.1 + - laravel: 6.* + php: 8.1 + - laravel: 6.* + php: 8.2 + - laravel: 7.* + php: 7.1 + - laravel: 7.* + php: 8.1 + - laravel: 7.* + php: 8.2 + - laravel: 8.* + php: 7.1 + - laravel: 8.* + php: 7.2 + - laravel: 8.* + php: 8.2 + - laravel: 9.* + php: 7.1 + - laravel: 9.* + php: 7.2 + - laravel: 9.* + php: 7.3 + - laravel: 9.* + php: 7.4 + - laravel: 10.* + php: 7.1 + - laravel: 10.* + php: 7.2 + - laravel: 10.* + php: 7.3 + - laravel: 10.* + php: 7.4 + - laravel: 10.* + php: '8.0' - name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependency-version }} + name: PHP ${{ matrix.php }} / Laravel ${{ matrix.laravel }} steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: none - extensions: mbstring - - - name: Install dependencies - run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest - - - name: Execute tests - run: composer test + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extension: mbstring + coverage: none + + - name: Install dependencies + run: | + composer require "illuminate/contracts:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer install --prefer-dist --no-interaction --no-suggest + + - name: Installed dependencies + run: composer show -D + + - name: Execute tests + run: vendor/bin/phpunit --exclude-group skipped diff --git a/composer.json b/composer.json index 2d814a6..c125c3f 100644 --- a/composer.json +++ b/composer.json @@ -8,14 +8,14 @@ ], "license": "MIT", "require": { - "php": "^8.0", - "illuminate/support": "^8|^9" + "php": "^7.2|^8.0", + "illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0" }, "require-dev": { - "orchestra/testbench": "^6.24|^7.0", - "phpstan/phpstan": "^1.9", - "laravel/pint": "^1.2", - "pestphp/pest": "^1.22" + "phpunit/phpunit": "^9.3", + "orchestra/testbench": "^4.0 || ^6.0 || ^7.0 || ^8.0", + "phpunit/phpunit": "^8.3 || ^9.0", + "friendsofphp/php-cs-fixer": "^3.0" }, "autoload": { "psr-4": {