diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 44d9df2..91098f0 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -8,40 +8,51 @@ jobs: strategy: fail-fast: false matrix: - php: [8.2, 8.1, 8.0] - laravel: [10.*, 9.*] + php: [8.0, 8.1, 8.2, 8.3] + laravel: [9.*, 10.*, 11.*] dependency-version: [prefer-lowest, prefer-stable] include: + - laravel: 11.* + testbench: 9.* + pest-plugin-laravel: 2.3.0 + - laravel: 10.* testbench: 8.* + pest-plugin-laravel: 2.0.0 + - laravel: 9.* testbench: 7.* + pest-plugin-laravel: 1.4.0 + exclude: + - laravel: 11.* + php: 8.1 + + - laravel: 11.* + php: 8.0 + - laravel: 10.* php: 8.0 + - laravel: 9.* + php: 8.3 + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} steps: - name: Checkout code uses: actions/checkout@v4 - - name: Cache dependencies - uses: actions/cache@v4 - with: - path: ~/.composer/cache/files - key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} - - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo + extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv coverage: none - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:^2.63" --dev --no-interaction --no-update + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "pestphp/pest-plugin-laravel:${{ matrix.pest-plugin-laravel }}" --no-interaction --no-update composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction - name: Execute tests run: vendor/bin/pest \ No newline at end of file diff --git a/composer.json b/composer.json index 04c8942..991fdf7 100644 --- a/composer.json +++ b/composer.json @@ -5,6 +5,7 @@ "milwad", "milwad-dev", "laravel-attributes", + "laravel attributes", "easy attributes", "laravel", "laravel attributes package" @@ -15,18 +16,17 @@ { "name": "milwad khosravi", "email": "milwad.dev@gmail.com", - "homepage": "https://milwad.ir", + "homepage": "https://github.com/milwad-dev", "role": "Developer" } ], "require": { "php": "^8.0", - "illuminate/contracts": "9.*|10.*" + "laravel/framework": "^9.0|^10.0|^11.0" }, "require-dev": { - "orchestra/testbench": "^7.0 || ^8.0", - "pestphp/pest": "^1.0", - "pestphp/pest-plugin-laravel": "^1.0" + "pestphp/pest-plugin-laravel": "^1.4.0|^2.0.0", + "orchestra/testbench": "^7.0|^8.0|^9.0" }, "autoload": { "psr-4": { diff --git a/tests/TestCase.php b/tests/TestCase.php index bea3c86..ab53b35 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -2,6 +2,7 @@ namespace Milwad\LaravelAttributes\Tests; +use Illuminate\Support\Facades\Artisan; use Milwad\LaravelAttributes\LaravelAttributesServiceProvider; abstract class TestCase extends \Orchestra\Testbench\TestCase @@ -37,6 +38,9 @@ protected function getEnvironmentSetUp($app) protected function setUp(): void { parent::setUp(); + $this->loadMigrationsFrom(__DIR__.'/SetUp/migrations'); + + Artisan::call('migrate'); } }