Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/.gitattributes export-ignore
/.github/ export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/examples export-ignore
/phpunit.xml.dist export-ignore
/phpunit.xml.legacy export-ignore
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
push:
pull_request:

jobs:
PHPUnit:
name: PHPUnit (PHP ${{ matrix.php }} on ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-20.04
- windows-2019
php:
- 7.4
- 7.3
- 7.2
- 7.1
- 7.0
- 5.6
- 5.5
- 5.4
- 5.3
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
- run: composer install
- run: vendor/bin/phpunit --coverage-text
if: ${{ matrix.php >= 7.3 }}
- run: vendor/bin/phpunit --coverage-text -c phpunit.xml.legacy
if: ${{ matrix.php < 7.3 }}
- run: php examples/13-benchmark-throughput.php

PHPUnit-hhvm:
name: PHPUnit (HHVM)
runs-on: ubuntu-18.04
continue-on-error: true
steps:
- uses: actions/checkout@v2
- uses: azjezz/setup-hhvm@v1
with:
version: lts-3.30
- run: hhvm $(which composer) require phpunit/phpunit:^5 --dev # requires legacy phpunit
- run: hhvm vendor/bin/phpunit
- run: hhvm examples/13-benchmark-throughput.php
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Child Process

[![Build Status](https://travis-ci.org/reactphp/child-process.svg?branch=master)](https://travis-ci.org/reactphp/child-process)
[![CI status](https://github.com/reactphp/child-process/workflows/CI/badge.svg)](https://github.com/reactphp/child-process/actions)

Event-driven library for executing child processes with
[ReactPHP](https://reactphp.org/).
Expand Down
15 changes: 11 additions & 4 deletions tests/AbstractProcessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ public function testStartWithCustomPipesWillAssignPipes()

public function testStartWithInvalidFileDescriptorPathWillThrow()
{
if (defined('HHVM_VERSION')) {
$this->markTestSkipped('Not supported on legacy HHVM');
}

$fds = array(
4 => array('file', '/dev/does-not-exist', 'r')
);
Expand All @@ -101,6 +105,9 @@ public function testStartWithExcessiveNumberOfFileDescriptorsWillThrow()
if (PHP_VERSION_ID < 70000) {
$this->markTestSkipped('PHP 7+ only, causes memory overflow on legacy PHP 5');
}
if (defined('HHVM_VERSION')) {
$this->markTestSkipped('Not supported on legacy HHVM');
}

$ulimit = exec('ulimit -n 2>&1');
if ($ulimit < 1) {
Expand Down Expand Up @@ -273,6 +280,10 @@ public function testReceivesProcessOutputFromStdoutAttachedToSocket()

public function testReceivesProcessOutputFromStdoutRedirectedToSocketProcess()
{
if (defined('HHVM_VERSION')) {
$this->markTestSkipped('Not supported on legacy HHVM');
}

// create TCP/IP server on random port and wait for client connection
$server = stream_socket_server('tcp://127.0.0.1:0');

Expand Down Expand Up @@ -430,10 +441,6 @@ public function testProcessWithEnv()
$this->markTestSkipped('Process pipes not supported on Windows');
}

if (getenv('TRAVIS')) {
$this->markTestSkipped('Cannot execute PHP processes with custom environments on Travis CI.');
}

$cmd = $this->getPhpBinary() . ' -r ' . escapeshellarg('echo getenv("foo"), PHP_EOL;');

$loop = $this->createLoop();
Expand Down