diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 7477485..10fd783 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,72 +1,76 @@ name: Tests on: - push: - pull_request: - branches: [main] - schedule: - - cron: '0 0 * * *' + push: + pull_request: + branches: + - main + schedule: + - cron: '0 0 * * *' jobs: - test: - if: github.event_name != 'schedule' || github.repository == 'ylsideas/feature-flags' - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - php: [8.4, 8.3, 8.2] - laravel: [12.*, 11.*, 10.*] - dependencies: [lowest, stable] - include: - - laravel: 10.* - testbench: ^8.0 - - laravel: 11.* - testbench: 9.* - - laravel: 12.* - testbench: 10.* - - dependencies: lowest - carbon: ^3.8.4 - - laravel: 10.* - dependencies: lowest - carbon: ^2.62.1 + test: + if: "github.event_name != 'schedule' || github.repository == 'ylsideas/feature-flags'" - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependencies }} - ${{ matrix.os }} + runs-on: ${{ matrix.os }} - steps: - - name: Checkout code - uses: actions/checkout@v2 + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + php: [8.4, 8.3, 8.2] + laravel: ['10.*', '11.*', '12.*', '13.*'] + dependencies: [lowest, stable] + include: + - laravel: 10.* + testbench: ^8.0 + - laravel: 11.* + testbench: 9.* + - laravel: 12.* + testbench: 10.* + - dependencies: lowest + carbon: ^3.8.4 + - laravel: 10.* + dependencies: lowest + carbon: ^2.62.1 + - laravel: 13.* + testbench: ^11.0 + exclude: + - laravel: 13.* + php: 8.2 - - 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, fileinfo - coverage: none + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependencies }} - ${{ matrix.os }} - - name: Setup problem matchers - run: | - echo "::add-matcher::${{ runner.tool_cache }}/php.json" - echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + steps: + - name: Checkout code + uses: actions/checkout@v2 - - name: Require Laravel Version - run: > - composer require - "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" - --no-interaction --no-update + - 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, fileinfo + coverage: none - - name: Require Minimum Packages for version - if: ${{ matrix.dependencies == 'lowest' }} - run: > - composer require - "nesbot/carbon:${{ matrix.carbon }}" - --no-interaction --no-update + - name: Setup problem matchers + run: | + echo "::add-matcher::${{ runner.tool_cache }}/php.json" + echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - name: Install dependencies - uses: ramsey/composer-install@v2 - with: - dependency-versions: ${{ matrix.dependencies }} - composer-options: ${{ matrix.composer-options }} + - name: Require Laravel Version + run: | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - - name: Execute tests - run: vendor/bin/pest + - name: Require Minimum Packages for version + if: "${{ matrix.dependencies == 'lowest' }}" + run: | + composer require "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update + + - name: Install dependencies + uses: ramsey/composer-install@v2 + with: + dependency-versions: ${{ matrix.dependencies }} + composer-options: ${{ matrix.composer-options }} + + - name: Execute tests + run: vendor/bin/pest diff --git a/composer.json b/composer.json index ad734b7..600e72d 100755 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ ], "require": { "php": "^8.2", - "illuminate/contracts": "12.*|11.*|10.*" + "illuminate/contracts": "12.*|11.*|10.*|^13.0" }, "require-dev": { "composer/semver": "^3.0", @@ -25,7 +25,7 @@ "laravel/pint": "^1.0", "mockery/mockery": "^1.6.12", "nunomaduro/collision": "^8.0|^7.8|^6.0", - "orchestra/testbench": "^10.0|^9.0|^8.0", + "orchestra/testbench": "^10.0|^9.0|^8.0|^11.0", "pestphp/pest": "^1.21|^2.34|^3.0", "pestphp/pest-plugin-arch": "^2.6|^3.0", "pestphp/pest-plugin-laravel": "^1.1|^2.3|^3.0",