diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cc18f15..34dc6db 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,8 +3,10 @@ on: [push, pull_request] jobs: build: runs-on: ubuntu-latest + name: PHP ${{ matrix.php }} / MySQL ${{ matrix.mysql-version }} strategy: + fail-fast: false matrix: php: [ '8.2', '8.3', '8.4', '8.5' ] mysql-version: [ '5.7', '8.0', '8.4' ] @@ -49,4 +51,4 @@ jobs: run: composer install --prefer-dist --no-progress --no-suggest - name: Run tests - run: vendor/bin/phpunit --coverage-text + run: vendor/bin/phpunit --coverage-text --testdox diff --git a/tests/Integration/BaseCase.php b/tests/Integration/BaseCase.php index 05edeb3..8970b3b 100644 --- a/tests/Integration/BaseCase.php +++ b/tests/Integration/BaseCase.php @@ -32,6 +32,8 @@ abstract class BaseCase extends TestCase private TestEventSubscribers $testEventSubscribers; + private static bool $serverVersionPrinted = false; + protected function setUp(): void { parent::setUp(); @@ -76,6 +78,16 @@ public function connect(): void throw new RuntimeException('Connection not initialized'); } $this->connection = $connection; + + if (!self::$serverVersionPrinted) { + $serverInfo = $this->mySQLReplicationFactory->getServerInfo(); + fwrite(STDERR, sprintf( + "\n>> Tests running against MySQL server version: %s (%s)\n\n", + $serverInfo->serverVersion, + $serverInfo->versionName + )); + self::$serverVersionPrinted = true; + } $this->connection->executeStatement('SET SESSION time_zone = "UTC"'); $this->connection->executeStatement('DROP DATABASE IF EXISTS ' . $this->database); $this->connection->executeStatement('CREATE DATABASE ' . $this->database);