Skip to content

Commit

Permalink
Use GitHub actions for continuous integration (CI)
Browse files Browse the repository at this point in the history
Bye bye Travis CI, you've served us well.
  • Loading branch information
SimonFrings committed Feb 9, 2021
1 parent c459d2e commit 2f5e3c9
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 45 deletions.
6 changes: 3 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/.gitattributes export-ignore
/.github/ export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/examples export-ignore
/examples/ export-ignore
/phpunit.xml.dist export-ignore
/phpunit.xml.legacy export-ignore
/tests export-ignore
/tests/ export-ignore
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI

on:
push:
pull_request:

jobs:
PHPUnit:
name: PHPUnit (PHP ${{ matrix.php }})
runs-on: ubuntu-20.04
strategy:
matrix:
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: time php examples/91-benchmark-throughput.php

PHPUnit-macOS:
name: PHPUnit (macOS)
runs-on: macos-10.15
continue-on-error: true
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: xdebug
- run: composer install
- run: vendor/bin/phpunit --coverage-text
- run: time php examples/91-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) install
- run: hhvm vendor/bin/phpunit
- run: time php examples/91-benchmark-throughput.php
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
composer.lock
vendor
/composer.lock
/vendor/
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 @@
# Stream

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

Event-driven readable and writable streams for non-blocking I/O in [ReactPHP](https://reactphp.org/).

Expand Down
4 changes: 2 additions & 2 deletions tests/FunctionalInternetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function testUploadBiggerBlockPlain()
public function testUploadKilobyteSecure()
{
$size = 1000;
$stream = stream_socket_client('tls://httpbin.org:443');
$stream = stream_socket_client('ssl://httpbin.org:443');

$loop = Factory::create();
$stream = new DuplexResourceStream($stream, $loop);
Expand All @@ -85,7 +85,7 @@ public function testUploadBiggerBlockSecure()
// a bit to trigger different behavior on Linux vs Mac OS X.
$size = 136 * 1000;

$stream = stream_socket_client('tls://httpbin.org:443');
$stream = stream_socket_client('ssl://httpbin.org:443');

// PHP < 7.1.4 (and PHP < 7.0.18) suffers from a bug when writing big
// chunks of data over TLS streams at once.
Expand Down

0 comments on commit 2f5e3c9

Please sign in to comment.