Skip to content

Commit 202bbf2

Browse files
committed
Update test suite and report failed assertions
1 parent b7fc2d0 commit 202bbf2

File tree

4 files changed

+42
-23
lines changed

4 files changed

+42
-23
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
strategy:
1212
matrix:
1313
os:
14-
- ubuntu-20.04
15-
- windows-2019
14+
- ubuntu-22.04
15+
- windows-2022
1616
php:
1717
- 8.2
1818
- 8.1
@@ -27,11 +27,12 @@ jobs:
2727
- 5.4
2828
- 5.3
2929
steps:
30-
- uses: actions/checkout@v2
30+
- uses: actions/checkout@v3
3131
- uses: shivammathur/setup-php@v2
3232
with:
3333
php-version: ${{ matrix.php }}
3434
coverage: xdebug
35+
ini-file: development
3536
- run: composer install
3637
- run: vendor/bin/phpunit --coverage-text
3738
if: ${{ matrix.php >= 7.3 }}
@@ -41,14 +42,20 @@ jobs:
4142

4243
PHPUnit-hhvm:
4344
name: PHPUnit (HHVM)
44-
runs-on: ubuntu-18.04
45+
runs-on: ubuntu-22.04
4546
continue-on-error: true
4647
steps:
47-
- uses: actions/checkout@v2
48-
- uses: azjezz/setup-hhvm@v1
48+
- uses: actions/checkout@v3
49+
- run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM
50+
- name: Run hhvm composer.phar install
51+
uses: docker://hhvm/hhvm:3.30-lts-latest
4952
with:
50-
version: lts-3.30
51-
- run: composer self-update --2.2 # downgrade Composer for HHVM
52-
- run: hhvm $(which composer) install
53-
- run: hhvm vendor/bin/phpunit
54-
- run: hhvm examples/13-benchmark-throughput.php
53+
args: hhvm composer.phar install
54+
- name: Run hhvm vendor/bin/phpunit
55+
uses: docker://hhvm/hhvm:3.30-lts-latest
56+
with:
57+
args: hhvm vendor/bin/phpunit
58+
- name: Run hhvm examples/13-benchmark-throughput.php
59+
uses: docker://hhvm/hhvm:3.30-lts-latest
60+
with:
61+
args: hhvm examples/13-benchmark-throughput.php

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"react/stream": "^1.2"
3333
},
3434
"require-dev": {
35-
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35",
35+
"phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35",
3636
"react/socket": "^1.8",
3737
"sebastian/environment": "^5.0 || ^3.0 || ^2.0 || ^1.0"
3838
},

phpunit.xml.dist

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<!-- PHPUnit configuration file with new format for PHPUnit 9.3+ -->
4-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
3+
<!-- PHPUnit configuration file with new format for PHPUnit 9.5+ -->
4+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
66
bootstrap="vendor/autoload.php"
7+
cacheResult="false"
78
colors="true"
8-
cacheResult="false">
9+
convertDeprecationsToExceptions="true">
910
<testsuites>
1011
<testsuite name="React Test Suite">
1112
<directory>./tests/</directory>
@@ -16,4 +17,12 @@
1617
<directory>./src/</directory>
1718
</include>
1819
</coverage>
20+
<php>
21+
<ini name="error_reporting" value="-1" />
22+
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
23+
<!-- <ini name="zend.assertions=1" value="1" /> -->
24+
<ini name="assert.active" value="1" />
25+
<ini name="assert.exception" value="1" />
26+
<ini name="assert.bail" value="0" />
27+
</php>
1928
</phpunit>

phpunit.xml.legacy

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<!-- PHPUnit configuration file with old format for PHPUnit 9.2 or older -->
3+
<!-- PHPUnit configuration file with old format for legacy PHPUnit -->
44
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.8/phpunit.xsd"
66
bootstrap="vendor/autoload.php"
7-
colors="true"
8-
convertErrorsToExceptions="true"
9-
convertNoticesToExceptions="true"
10-
convertWarningsToExceptions="true"
11-
processIsolation="false"
12-
stopOnFailure="false">
7+
colors="true">
138
<testsuites>
149
<testsuite name="React Test Suite">
1510
<directory>./tests/</directory>
@@ -20,4 +15,12 @@
2015
<directory>./src/</directory>
2116
</whitelist>
2217
</filter>
18+
<php>
19+
<ini name="error_reporting" value="-1" />
20+
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
21+
<!-- <ini name="zend.assertions=1" value="1" /> -->
22+
<ini name="assert.active" value="1" />
23+
<ini name="assert.exception" value="1" />
24+
<ini name="assert.bail" value="0" />
25+
</php>
2326
</phpunit>

0 commit comments

Comments
 (0)