Skip to content

Commit 81a7767

Browse files
committed
Update test suite and report failed assertions
1 parent a559642 commit 81a7767

File tree

4 files changed

+40
-15
lines changed

4 files changed

+40
-15
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ on:
77
jobs:
88
PHPUnit:
99
name: PHPUnit (PHP ${{ matrix.php }})
10-
runs-on: ubuntu-18.04
10+
runs-on: ubuntu-22.04
11+
continue-on-error: true
1112
strategy:
1213
matrix:
1314
php:
@@ -24,11 +25,16 @@ jobs:
2425
- 5.4
2526
- 5.3
2627
steps:
27-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v3
2829
- uses: shivammathur/setup-php@v2
2930
with:
3031
php-version: ${{ matrix.php }}
3132
coverage: xdebug
33+
ini-file: development
34+
ini-values: disable_functions='' # do not disable PCNTL functions on PHP < 8.1
35+
extensions: sockets, pcntl
36+
env:
37+
fail-fast: true # fail step if any extension can not be installed
3238
- run: composer install
3339
- run: vendor/bin/phpunit --coverage-text --exclude-group internet
3440
if: ${{ matrix.php >= 7.3 }}
@@ -37,13 +43,16 @@ jobs:
3743

3844
PHPUnit-hhvm:
3945
name: PHPUnit (HHVM)
40-
runs-on: ubuntu-18.04
46+
runs-on: ubuntu-22.04
4147
continue-on-error: true
4248
steps:
43-
- uses: actions/checkout@v2
44-
- uses: azjezz/setup-hhvm@v1
49+
- uses: actions/checkout@v3
50+
- run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM
51+
- name: Run hhvm composer.phar require react/async:^2 react/promise:^2 # downgrade Async and Promise for HHVM
52+
uses: docker://hhvm/hhvm:3.30-lts-latest
53+
with:
54+
args: hhvm composer.phar require react/async:^2 react/promise:^2
55+
- name: Run hhvm vendor/bin/phpunit --exclude-group internet
56+
uses: docker://hhvm/hhvm:3.30-lts-latest
4557
with:
46-
version: lts-3.30
47-
- run: composer self-update --2.2 # downgrade Composer for HHVM
48-
- run: hhvm $(which composer) require react/async:^2 react/promise:^2 # downgrade Async and Promise for HHVM
49-
- run: hhvm vendor/bin/phpunit --exclude-group internet
58+
args: hhvm vendor/bin/phpunit --exclude-group internet

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212
"react/async": "^4 || ^3 || ^2",
1313
"react/cache": "^1.1",
1414
"react/dns": "^1.10",
15-
"react/event-loop": "^1.3",
15+
"react/event-loop": "^1.4@dev",
1616
"react/http": "^1.8",
17-
"react/promise": "^3 || ^2.9 || ^1.2",
17+
"react/promise": "^3@dev || ^2.10@dev || ^1.2",
1818
"react/promise-stream": "^1.5",
1919
"react/promise-timer": "^1.9",
2020
"react/socket": "^1.12",
2121
"react/stream": "^1.2"
2222
},
2323
"require-dev": {
2424
"clue/stream-filter": "^1.3",
25-
"phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35"
25+
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36"
2626
},
2727
"config": {
2828
"preferred-install": {

phpunit.xml.dist

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

3-
<!-- PHPUnit configuration file with new format for PHPUnit 9.5+ -->
3+
<!-- PHPUnit configuration file with new format for PHPUnit 9.6+ -->
44
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
66
bootstrap="tests/bootstrap.php"
77
cacheResult="false"
88
colors="true"
@@ -19,4 +19,12 @@
1919
<directory>./vendor/react/*/src/</directory>
2020
</include>
2121
</coverage>
22+
<php>
23+
<ini name="error_reporting" value="-1" />
24+
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
25+
<!-- <ini name="zend.assertions" value="1" /> -->
26+
<ini name="assert.active" value="1" />
27+
<ini name="assert.exception" value="1" />
28+
<ini name="assert.bail" value="0" />
29+
</php>
2230
</phpunit>

phpunit.xml.legacy

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

3-
<!-- PHPUnit configuration file with old PHPUnit format for PHP < 7.3 -->
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="tests/bootstrap.php"
@@ -15,4 +15,12 @@
1515
<directory>./vendor/react/*/src/</directory>
1616
</whitelist>
1717
</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" 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>
1826
</phpunit>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy