diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 6f8ddd5..eae0336 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,50 +1,47 @@ name: run-tests on: - push: - branches: [master] - pull_request: - branches: [master] + push: + pull_request: jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: true - matrix: - os: [ubuntu-latest] - php: [8.2] - laravel: [10.*] - stability: [prefer-lowest, prefer-stable] - include: - - laravel: 10.* - testbench: 8.* - - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - 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/phpunit + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest] + php: [ 8.3, 8.2 ] + laravel: [ '10.*', '11.*' ] + stability: [prefer-lowest, prefer-stable] + include: + - laravel: 11.* + testbench: 9.* + - laravel: 10.* + testbench: 8.* + + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - 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: Execute tests + run: vendor/bin/phpunit diff --git a/composer.json b/composer.json index 04cd88b..0f4d15d 100644 --- a/composer.json +++ b/composer.json @@ -10,13 +10,13 @@ ], "require": { "php": "^8.2", - "illuminate/support": "^10.0", - "illuminate/view": "^10.0" + "illuminate/support": "^10.0|^11.0", + "illuminate/view": "^10.0|^11.0" }, "require-dev": { "laravel/pint": "^1.0", - "orchestra/testbench": "^8.0", - "phpunit/phpunit": "^10.0", + "orchestra/testbench": "^8.0|^9.0", + "phpunit/phpunit": "^10.5|^11.0", "spatie/phpunit-snapshot-assertions": "^5.0" }, "config": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 604d45e..1afc672 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,13 +1,13 @@ - - - - src/ - - + tests + + + src/ + + diff --git a/tests/__snapshots__/SocialShareTest__test_that_service_is_rendered__1.xml b/tests/__snapshots__/SocialShareTest__test_that_service_is_rendered__1.xml index 9739e9a..40d56a6 100644 --- a/tests/__snapshots__/SocialShareTest__test_that_service_is_rendered__1.xml +++ b/tests/__snapshots__/SocialShareTest__test_that_service_is_rendered__1.xml @@ -1,6 +1,6 @@
-