Merge remote-tracking branch 'origin/2.x' into 2.x #300
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: run-tests | |
| on: | |
| push: | |
| paths: | |
| - '**.php' | |
| - '.github/workflows/run-tests.yml' | |
| - 'phpunit.xml.dist' | |
| - 'composer.json' | |
| - 'composer.lock' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 5 | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: [ ubuntu-latest ] | |
| php: [ 8.5 ] | |
| laravel: [ ^13.0, ^12.25 ] | |
| stability: [ prefer-lowest, prefer-stable ] | |
| include: | |
| - laravel: ^13.0 | |
| testbench: 11.* | |
| - laravel: ^12.25 | |
| testbench: ^10.6 | |
| name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - 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: Setup problem matchers | |
| 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.stability }} --prefer-dist --no-interaction | |
| - name: List Installed Dependencies | |
| run: composer show -D | |
| - name: Execute tests | |
| run: ./vendor/bin/pest | |
| coverage: | |
| needs: test | |
| name: Tests and coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.5' | |
| extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo | |
| coverage: "pcov" | |
| - name: Setup problem matchers | |
| 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:13.*" "orchestra/testbench:11.*" "nesbot/carbon:^3.0" --no-interaction --no-update | |
| composer update --prefer-stable --prefer-dist --no-interaction | |
| - name: List Installed Dependencies | |
| run: composer show -D | |
| - name: Execute coverage | |
| run: php -dxdebug.mode=coverage ./vendor/bin/pest --coverage-clove ./.build/cache/coverage.xml | |
| - name: "Publish coverage report to Codecov" | |
| uses: "codecov/[email protected]" | |
| with: | |
| files: ./.build/cache/coverage.xml | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |