diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8d579a9..453f6ce 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,48 +1,54 @@ -name: "Tests" +name: Tests on: - push: - branches: [develop] - pull_request: - branches: [main] - schedule: - - cron: '0 0 * * *' + push: + branches: + - master + pull_request: + branches: + - "*" + schedule: + - cron: '0 0 * * *' jobs: - run-tests: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php: [7.4, 8.0, 8.1] - laravel: [8.*] - dependency-version: [prefer-lowest, prefer-stable] - include: - - laravel: 8.* - testbench: ^6.23 - - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick - coverage: none - - - name: Setup Problem Matches - run: | - echo "::add-matcher::${{ runner.tool_cache }}/php.json" - echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - - 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: vendor/bin/phpunit + run-tests: + runs-on: ubuntu-latest + timeout-minutes: 15 + env: + COMPOSER_NO_INTERACTION: 1 + + strategy: + fail-fast: false + matrix: + php: [8.1, 8.0, 7.4] + laravel: [9.*, 8.*] + dependency-version: [prefer-lowest, prefer-stable] + include: + - laravel: 9.* + testbench: 7.* + - laravel: 8.* + testbench: ^6.23 + exclude: + - laravel: 9.* + php: 7.4 + + name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependency-version }} + + 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 diff --git a/.php_cs.dist.php b/.php_cs.dist.php index 316fec0..7a55888 100644 --- a/.php_cs.dist.php +++ b/.php_cs.dist.php @@ -15,7 +15,7 @@ 'array_syntax' => ['syntax' => 'short'], 'ordered_imports' => ['sort_algorithm' => 'alpha'], 'no_unused_imports' => true, - 'not_operator_with_successor_space' => true, + 'not_operator_with_successor_space' => false, 'trailing_comma_in_multiline' => true, 'phpdoc_scalar' => true, 'unary_operator_spaces' => true, diff --git a/composer.json b/composer.json index 29a905d..1585de8 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "type": "library", "require": { "php": "^7.4|^8.0", - "illuminate/support": "^6.20.13|7.30.4|^8.22.2" + "illuminate/support": "^6|^7|^8|^9" }, "require-dev": { "phpunit/phpunit": "^9.3",