diff --git a/.github/workflows/job-tests.yml b/.github/workflows/job-tests.yml index b83192fd7b..b9421e948f 100644 --- a/.github/workflows/job-tests.yml +++ b/.github/workflows/job-tests.yml @@ -123,9 +123,36 @@ jobs: env: AZURITE_ACCOUNTS: flowphpaccount01:flowphpkey01 + # Main suite: everything except the grpc-exercising tests, so grpc is never + # exercised here and the process shuts down cleanly. Must pass. - name: "Test" + timeout-minutes: 15 + run: "just test --exclude-group grpc --log-junit ./var/phpunit/logs/junit.xml ${{ matrix.php-version == '8.3' && '--coverage-clover=./var/phpunit/coverage/clover/coverage.xml' || '' }}" + env: + PGSQL_DATABASE_URL: pgsql://postgres:postgres@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/postgres?serverVersion=11&charset=utf8 + MYSQL_DATABASE_URL: mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/mysql + SQLITE_DATABASE_URL: "sqlite:///:memory:" + AZURITE_HOST: "localhost" + AZURITE_BLOB_PORT: "10000" + AZURITE_ACCOUNT_NAME: "flowphpaccount01" + AZURITE_ACCOUNT_KEY: "flowphpkey01" + S3_ENDPOINT: "http://localhost:9000" + S3_REGION: "us-east-1" + S3_ACCESS_KEY_ID: "minioadmin" + S3_SECRET_ACCESS_KEY: "minioadmin" + OTEL_RECEIVER_HTTP_ENDPOINT: "http://localhost:4318" + OTEL_RECEIVER_GRPC_ENDPOINT: "localhost:4317" + OTEL_COLLECTOR_METRICS_ENDPOINT: "http://localhost:8888/metrics" + FLOW_PARQUET_TESTS_DEBUG: "0" + + # gRPC-exercising tests, isolated. grpc's EventEngine threads race PHP's extension + # dlclose at process shutdown on PHP 8.5/amd64 (upstream grpc#38216, no released fix), + # so this step is allowed to fail ONLY on 8.5. A real grpc test regression on 8.3/8.4 + # still fails CI. Remove continue-on-error once grpc ships a fix. + - name: "Test (grpc)" timeout-minutes: 10 - run: "just test --log-junit ./var/phpunit/logs/junit.xml ${{ matrix.php-version == '8.3' && '--coverage-clover=./var/phpunit/coverage/clover/coverage.xml' || '' }}" + continue-on-error: ${{ matrix.php-version == '8.5' }} + run: "just test --group grpc --log-junit ./var/phpunit/logs/grpc-junit.xml" env: PGSQL_DATABASE_URL: pgsql://postgres:postgres@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/postgres?serverVersion=11&charset=utf8 MYSQL_DATABASE_URL: mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/mysql diff --git a/src/bridge/telemetry/otlp/tests/Flow/Bridge/Telemetry/OTLP/Tests/Integration/LogExportIntegrationTest.php b/src/bridge/telemetry/otlp/tests/Flow/Bridge/Telemetry/OTLP/Tests/Integration/LogExportIntegrationTest.php index d23aff4842..d4094b41ee 100644 --- a/src/bridge/telemetry/otlp/tests/Flow/Bridge/Telemetry/OTLP/Tests/Integration/LogExportIntegrationTest.php +++ b/src/bridge/telemetry/otlp/tests/Flow/Bridge/Telemetry/OTLP/Tests/Integration/LogExportIntegrationTest.php @@ -7,7 +7,9 @@ use Flow\Bridge\Telemetry\OTLP\Tests\Context\TransportConfiguration; use Flow\Telemetry\Resource; use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; +#[Group('grpc')] final class LogExportIntegrationTest extends IntegrationTestCase { #[DataProvider('transportProvider')] diff --git a/src/bridge/telemetry/otlp/tests/Flow/Bridge/Telemetry/OTLP/Tests/Integration/MetricExportIntegrationTest.php b/src/bridge/telemetry/otlp/tests/Flow/Bridge/Telemetry/OTLP/Tests/Integration/MetricExportIntegrationTest.php index 3cf6ef12e5..81a30ef0e0 100644 --- a/src/bridge/telemetry/otlp/tests/Flow/Bridge/Telemetry/OTLP/Tests/Integration/MetricExportIntegrationTest.php +++ b/src/bridge/telemetry/otlp/tests/Flow/Bridge/Telemetry/OTLP/Tests/Integration/MetricExportIntegrationTest.php @@ -7,7 +7,9 @@ use Flow\Bridge\Telemetry\OTLP\Tests\Context\TransportConfiguration; use Flow\Telemetry\Resource; use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; +#[Group('grpc')] final class MetricExportIntegrationTest extends IntegrationTestCase { #[DataProvider('transportProvider')] diff --git a/src/bridge/telemetry/otlp/tests/Flow/Bridge/Telemetry/OTLP/Tests/Integration/SpanExportIntegrationTest.php b/src/bridge/telemetry/otlp/tests/Flow/Bridge/Telemetry/OTLP/Tests/Integration/SpanExportIntegrationTest.php index 536a9ab1ae..5b1b90f46b 100644 --- a/src/bridge/telemetry/otlp/tests/Flow/Bridge/Telemetry/OTLP/Tests/Integration/SpanExportIntegrationTest.php +++ b/src/bridge/telemetry/otlp/tests/Flow/Bridge/Telemetry/OTLP/Tests/Integration/SpanExportIntegrationTest.php @@ -15,7 +15,9 @@ use Flow\Telemetry\Tracer\SpanLink; use Flow\Telemetry\Tracer\SpanStatus; use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; +#[Group('grpc')] final class SpanExportIntegrationTest extends IntegrationTestCase { #[DataProvider('transportProvider')] diff --git a/src/bridge/telemetry/otlp/tests/Flow/Bridge/Telemetry/OTLP/Tests/Unit/Transport/GrpcTransportTest.php b/src/bridge/telemetry/otlp/tests/Flow/Bridge/Telemetry/OTLP/Tests/Unit/Transport/GrpcTransportTest.php index 7fada3045a..f8edaff949 100644 --- a/src/bridge/telemetry/otlp/tests/Flow/Bridge/Telemetry/OTLP/Tests/Unit/Transport/GrpcTransportTest.php +++ b/src/bridge/telemetry/otlp/tests/Flow/Bridge/Telemetry/OTLP/Tests/Unit/Transport/GrpcTransportTest.php @@ -13,6 +13,7 @@ use Google\Protobuf\Internal\Message; use Grpc\BaseStub; use InvalidArgumentException; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\Attributes\RequiresPhpExtension; use PHPUnit\Framework\TestCase; use RuntimeException; @@ -23,6 +24,7 @@ use function extension_loaded; use function str_contains; +#[Group('grpc')] final class GrpcTransportTest extends TestCase { #[RequiresPhpExtension('grpc')]