diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 206dc9c..87cd8b1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,14 @@ jobs: php-ts: nts continue-on-error: false + - operating-system: 'ubuntu-latest' + php-version: '8.3' + php-ts: nts + continue-on-error: false + static-analysis: none + style-fix: none + composer-require-checker-version: none + - operating-system: 'ubuntu-latest' php-version: '8.1' php-extensions: parallel @@ -49,6 +57,12 @@ jobs: php-ts: nts continue-on-error: false + - operating-system: 'windows-latest' + php-version: '8.3' + job-description: 'on Windows' + php-ts: nts + continue-on-error: false + name: PHP ${{ matrix.php-version }} ${{ matrix.job-description }} runs-on: ${{ matrix.operating-system }} @@ -98,6 +112,9 @@ jobs: composer update --optimize-autoloader --no-interaction --no-progress ${{ matrix.composer-flags }} composer info -D + - name: Run process example + run: php examples/process.php + - name: Run tests run: vendor/bin/phpunit ${{ matrix.phpunit-flags }} diff --git a/test/Context/AbstractContextTest.php b/test/Context/AbstractContextTest.php index c1dd941..bf5b5ea 100644 --- a/test/Context/AbstractContextTest.php +++ b/test/Context/AbstractContextTest.php @@ -55,6 +55,9 @@ abstract class AbstractContextTest extends AsyncTestCase $context->send(1); + delay(1); // await TCP RST + + $context->send(1); self::fail('Sending should have failed'); } @@ -96,7 +99,7 @@ abstract class AbstractContextTest extends AsyncTestCase public function testCloseWhenJoining(): void { - $this->setTimeout(1); + $this->setTimeout(3); $this->expectException(ContextException::class); $this->expectExceptionMessage('The context has already closed'); @@ -147,6 +150,8 @@ abstract class AbstractContextTest extends AsyncTestCase $context = $this->createContext(__DIR__ . "/Fixtures/exiting-process.php"); delay(1); $context->send(1); + delay(1); // Await TCP RST + $context->send(1); } public function testCancelJoin(): void diff --git a/test/Worker/AbstractPoolTest.php b/test/Worker/AbstractPoolTest.php index 0d10f4f..21c2f35 100644 --- a/test/Worker/AbstractPoolTest.php +++ b/test/Worker/AbstractPoolTest.php @@ -122,7 +122,7 @@ abstract class AbstractPoolTest extends AbstractWorkerTest public function testPooledKill(): void { - $this->setTimeout(1); + $this->setTimeout(10); // See https://github.com/amphp/parallel/issues/66 $pool = $this->createPool(1);