Skip to content

Commit f93a15f

Browse files
authored
Merge pull request #84 from clue-labs/github-ci
Use GitHub actions for continuous integration (CI)
2 parents 1110f31 + 00c6fe4 commit f93a15f

File tree

5 files changed

+63
-43
lines changed

5 files changed

+63
-43
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/.gitattributes export-ignore
2+
/.github/ export-ignore
23
/.gitignore export-ignore
3-
/.travis.yml export-ignore
44
/examples export-ignore
55
/phpunit.xml.dist export-ignore
66
/phpunit.xml.legacy export-ignore

.github/workflows/ci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
PHPUnit:
9+
name: PHPUnit (PHP ${{ matrix.php }} on ${{ matrix.os }})
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os:
14+
- ubuntu-20.04
15+
- windows-2019
16+
php:
17+
- 7.4
18+
- 7.3
19+
- 7.2
20+
- 7.1
21+
- 7.0
22+
- 5.6
23+
- 5.5
24+
- 5.4
25+
- 5.3
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: shivammathur/setup-php@v2
29+
with:
30+
php-version: ${{ matrix.php }}
31+
coverage: xdebug
32+
- run: composer install
33+
- run: vendor/bin/phpunit --coverage-text
34+
if: ${{ matrix.php >= 7.3 }}
35+
- run: vendor/bin/phpunit --coverage-text -c phpunit.xml.legacy
36+
if: ${{ matrix.php < 7.3 }}
37+
- run: php examples/13-benchmark-throughput.php
38+
39+
PHPUnit-hhvm:
40+
name: PHPUnit (HHVM)
41+
runs-on: ubuntu-18.04
42+
continue-on-error: true
43+
steps:
44+
- uses: actions/checkout@v2
45+
- uses: azjezz/setup-hhvm@v1
46+
with:
47+
version: lts-3.30
48+
- run: hhvm $(which composer) require phpunit/phpunit:^5 --dev # requires legacy phpunit
49+
- run: hhvm vendor/bin/phpunit
50+
- run: hhvm examples/13-benchmark-throughput.php

.travis.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Child Process
22

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

55
Event-driven library for executing child processes with
66
[ReactPHP](https://reactphp.org/).

tests/AbstractProcessTest.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ public function testStartWithCustomPipesWillAssignPipes()
8686

8787
public function testStartWithInvalidFileDescriptorPathWillThrow()
8888
{
89+
if (defined('HHVM_VERSION')) {
90+
$this->markTestSkipped('Not supported on legacy HHVM');
91+
}
92+
8993
$fds = array(
9094
4 => array('file', '/dev/does-not-exist', 'r')
9195
);
@@ -101,6 +105,9 @@ public function testStartWithExcessiveNumberOfFileDescriptorsWillThrow()
101105
if (PHP_VERSION_ID < 70000) {
102106
$this->markTestSkipped('PHP 7+ only, causes memory overflow on legacy PHP 5');
103107
}
108+
if (defined('HHVM_VERSION')) {
109+
$this->markTestSkipped('Not supported on legacy HHVM');
110+
}
104111

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

274281
public function testReceivesProcessOutputFromStdoutRedirectedToSocketProcess()
275282
{
283+
if (defined('HHVM_VERSION')) {
284+
$this->markTestSkipped('Not supported on legacy HHVM');
285+
}
286+
276287
// create TCP/IP server on random port and wait for client connection
277288
$server = stream_socket_server('tcp://127.0.0.1:0');
278289

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

433-
if (getenv('TRAVIS')) {
434-
$this->markTestSkipped('Cannot execute PHP processes with custom environments on Travis CI.');
435-
}
436-
437444
$cmd = $this->getPhpBinary() . ' -r ' . escapeshellarg('echo getenv("foo"), PHP_EOL;');
438445

439446
$loop = $this->createLoop();

0 commit comments

Comments
 (0)