Fix and re-enable windows CI

This commit is contained in:
Niklas Keller 2023-03-02 15:57:26 -06:00 committed by Aaron Piotrowski
parent 815c2500bc
commit a072e63c3f
No known key found for this signature in database
GPG Key ID: 5B456E6AABA44A63
3 changed files with 24 additions and 2 deletions

View File

@ -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 }}

View File

@ -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

View File

@ -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);