diff --git a/.gitattributes b/.gitattributes index 64ab6e0..fc0be87 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..366d72a --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.gitignore b/.gitignore index 987e2a2..c8153b5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -composer.lock -vendor +/composer.lock +/vendor/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a2498b1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,37 +0,0 @@ -language: php - -# lock distro so new future defaults will not break the build -dist: trusty - -jobs: - include: - - php: 5.3 - dist: precise - - php: 5.4 - - php: 5.5 - - php: 5.6 - - php: 7.0 - - php: 7.1 - - php: 7.2 - - php: 7.3 - - php: 7.4 - - php: hhvm-3.18 - install: - - composer require phpunit/phpunit:^5 --dev --no-interaction # requires legacy phpunit - - name: Mac OS X - os: osx - language: generic - before_install: - - curl -s http://getcomposer.org/installer | php - - mv composer.phar /usr/local/bin/composer - allow_failures: - - php: hhvm-3.18 - - os: osx - -install: - - composer install - -script: - - if [[ "$TRAVIS_PHP_VERSION" > "7.2" ]]; then vendor/bin/phpunit --coverage-text; fi - - if [[ "$TRAVIS_PHP_VERSION" < "7.3" ]]; then vendor/bin/phpunit --coverage-text -c phpunit.xml.legacy; fi - - time php examples/91-benchmark-throughput.php diff --git a/README.md b/README.md index c79bacf..2ec6219 100644 --- a/README.md +++ b/README.md @@ -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/). diff --git a/tests/FunctionalInternetTest.php b/tests/FunctionalInternetTest.php index f27c5f9..4f07537 100644 --- a/tests/FunctionalInternetTest.php +++ b/tests/FunctionalInternetTest.php @@ -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); @@ -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.