diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b1cad46..5633302 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,13 +26,11 @@ jobs: tools: composer:v2 coverage: none - - name: Install dependencies - uses: nick-invision/retry@v1 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress ${{ matrix.flags }} + - name: Install Composer dependencies + run: | + if [[ "${{ matrix.php }}" = "8.3" ]]; then sed -i -e 's/\("orchestra\/testbench":[[:space:]]*\)".*"/\1"^9.0"/' composer.json; fi + composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress ${{ matrix.flags }} - name: Execute tests continue-on-error: ${{ matrix.php > 8 }} - run: vendor/bin/phpunit --verbose + run: vendor/bin/phpunit diff --git a/.gitignore b/.gitignore index 8faaf57..fb0eb3e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .idea +.phpunit.cache /vendor composer.lock .php-cs-fixer.cache diff --git a/composer.json b/composer.json index b9e53e0..91fc88d 100644 --- a/composer.json +++ b/composer.json @@ -20,8 +20,8 @@ }, "require-dev": { "mockery/mockery": "^0.9|^1.3", - "orchestra/testbench": "^5.19|^6.18|^7.0|^8.0", - "phpunit/phpunit": "^8.5|^9.1|^10.0" + "orchestra/testbench": "^5.19|^6.18|^7.0|^8.0|^9.0", + "phpunit/phpunit": "^8.5|^9.1|^10.0|^11.0" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 6079ee3..ce008e0 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,14 +1,9 @@ - - - - ./src - - + processIsolation="false" stopOnError="false" stopOnFailure="false" + xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.0/phpunit.xsd" cacheDirectory=".phpunit.cache" + backupStaticProperties="false"> ./tests @@ -20,4 +15,9 @@ + + + ./src + + diff --git a/tests/Console/ParallelCommandTest.php b/tests/Console/ParallelCommandTest.php index d8164ad..fd234b3 100644 --- a/tests/Console/ParallelCommandTest.php +++ b/tests/Console/ParallelCommandTest.php @@ -3,8 +3,6 @@ namespace Recca0120\LaravelParallel\Tests\Console; use Illuminate\Foundation\Auth\User; -use Illuminate\Foundation\Testing\RefreshDatabase; -use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Http\Response; use Recca0120\LaravelParallel\Console\ParallelCommand; use Recca0120\LaravelParallel\ResponseIdentifier; @@ -14,9 +12,6 @@ class ParallelCommandTest extends TestCase { - use RefreshDatabase; - use WithFaker; - /** * @var User */ diff --git a/tests/Fixtures/SetupDatabase.php b/tests/Fixtures/SetupDatabase.php index 7549e4b..3f95d1f 100644 --- a/tests/Fixtures/SetupDatabase.php +++ b/tests/Fixtures/SetupDatabase.php @@ -2,6 +2,7 @@ namespace Recca0120\LaravelParallel\Tests\Fixtures; +use Illuminate\Database\Schema\Builder; use Illuminate\Support\Facades\Hash; trait SetupDatabase @@ -18,8 +19,10 @@ protected function databaseSetUp($app) $app['config']->set('auth.providers.users.model', User::class); + /** @var Builder $schema */ $schema = $app['db']->getSchemaBuilder(); + $schema->dropIfExists('users'); $schema->create('users', function ($table) { $table->increments('id'); $table->string('email')->unique();