Skip to content

Commit 0046774

Browse files
committed
Update: Suppress unnecessary exceptions
1 parent 85eb332 commit 0046774

17 files changed

+159
-345
lines changed

.github/workflows/codecov.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: PHP Unit Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
strategy:
14+
matrix:
15+
os: [ ubuntu-latest, macos-latest ]
16+
php-version: [ '8.1', '8.2', '8.3', '8.4' ]
17+
runs-on: ${{ matrix.os }}
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v3
22+
23+
- name: Setup PHP
24+
uses: shivammathur/setup-php@v2
25+
with:
26+
php-version: ${{ matrix.php-version }}
27+
extensions: posix, sockets, pcntl, openssl, parallel, curl, ev
28+
env:
29+
phpts: ts
30+
31+
- name: Install dependencies
32+
run: composer self-update && composer install && composer dump-autoload
33+
- name: Run tests and collect coverage
34+
run: vendor/bin/phpunit --coverage-clover coverage.xml .
35+
- name: Upload coverage to Codecov
36+
uses: codecov/codecov-action@v4
37+
env:
38+
CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ visit [Quick Deployment](https://ripple.cloudtay.com/docs/install/server)
3838
**🚀 [Guzzle](https://docs.guzzlephp.org/en/stable/)**
3939
PHP is the most widely used HTTP client
4040

41-
**🔥[AmPHP](https://amphp.org/)**
41+
**🔥 [AmPHP](https://amphp.org/)**
4242
Provides rich PHP asynchronous components for users to encapsulate by themselves
4343

44-
**🚀[Driver](https://github.com/cloudtay/ripple-driver)**
44+
**🚀 [Driver](https://github.com/cloudtay/ripple-driver)**
4545
The official high-performance driver library provides seamless access to your traditional applications.
4646

47-
**🚀[Webman-coroutine](https://github.com/workbunny/webman-coroutine)**
47+
**🚀 [Webman-coroutine](https://github.com/workbunny/webman-coroutine)**
4848
The workbunny team's integrated webman coroutine extension provides coroutine support for Webman.
4949

5050
**🟢[ripple](https://github.com/cloudtay/ripple)**

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@
4646
"ext-zlib": "For better compression",
4747
"cloudtay/ripple-http": "For better http client",
4848
"cloudtay/ripple-websocket": "For better websocket client",
49-
"cloudtay/ripple-mysql": "For better mysql client",
50-
"cloudtay/ripple-guzzle": "For better guzzle client"
49+
"cloudtay/ripple-rdo": "For better mysql client"
5150
},
5251
"minimum-stability": "dev",
5352
"prefer-stable": true

example/broadcast.php

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

example/http-client.php

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

example/http-proxy.php

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

example/http-serve.php

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

example/http-sse.php

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

example/websocket-client.php

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

example/websocket-server.php

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

phpunit.xml

Lines changed: 7 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,3 @@
1-
<!--
2-
~ Copyright (c) 2023-2024.
3-
~
4-
~ Permission is hereby granted, free of charge, to any person obtaining a copy
5-
~ of this software and associated documentation files (the "Software"), to deal
6-
~ in the Software without restriction, including without limitation the rights
7-
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8-
~ copies of the Software, and to permit persons to whom the Software is
9-
~ furnished to do so, subject to the following conditions:
10-
~
11-
~ The above copyright notice and this permission notice shall be included in all
12-
~ copies or substantial portions of the Software.
13-
~
14-
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15-
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16-
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17-
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18-
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19-
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20-
~ SOFTWARE.
21-
~
22-
~ 特此免费授予任何获得本软件及相关文档文件(“软件”)副本的人,不受限制地处理
23-
~ 本软件,包括但不限于使用、复制、修改、合并、出版、发行、再许可和/或销售
24-
~ 软件副本的权利,并允许向其提供本软件的人做出上述行为,但须符合以下条件:
25-
~
26-
~ 上述版权声明和本许可声明应包含在本软件的所有副本或主要部分中。
27-
~
28-
~ 本软件按“原样”提供,不提供任何形式的保证,无论是明示或暗示的,
29-
~ 包括但不限于适销性、特定目的的适用性和非侵权性的保证。在任何情况下,
30-
~ 无论是合同诉讼、侵权行为还是其他方面,作者或版权持有人均不对
31-
~ 由于软件或软件的使用或其他交易而引起的任何索赔、损害或其他责任承担责任。
32-
-->
33-
341
<phpunit bootstrap="vendor/autoload.php"
352
colors="true"
363
stopOnFailure="false"
@@ -41,7 +8,13 @@
418
processIsolation="true">
429
<testsuites>
4310
<testsuite name="Core">
44-
<directory>tests</directory>
11+
<directory suffix=".php">tests</directory>
4512
</testsuite>
4613
</testsuites>
14+
15+
<coverage cacheDirectory=".phpunit.cache/code-coverage" processUncoveredFiles="true">
16+
<include>
17+
<directory suffix=".php">tests</directory>
18+
</include>
19+
</coverage>
4720
</phpunit>

0 commit comments

Comments
 (0)