Skip to content

Commit

Permalink
Update: Suppress unnecessary exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
cclilshy committed Nov 1, 2024
1 parent 85eb332 commit 0046774
Show file tree
Hide file tree
Showing 17 changed files with 159 additions and 345 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: PHP Unit Tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
php-version: [ '8.1', '8.2', '8.3', '8.4' ]
runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: posix, sockets, pcntl, openssl, parallel, curl, ev
env:
phpts: ts

- name: Install dependencies
run: composer self-update && composer install && composer dump-autoload
- name: Run tests and collect coverage
run: vendor/bin/phpunit --coverage-clover coverage.xml .
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ visit [Quick Deployment](https://ripple.cloudtay.com/docs/install/server)
**🚀 [Guzzle](https://docs.guzzlephp.org/en/stable/)**
PHP is the most widely used HTTP client

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

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

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

**🟢[ripple](https://github.com/cloudtay/ripple)**
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
"ext-zlib": "For better compression",
"cloudtay/ripple-http": "For better http client",
"cloudtay/ripple-websocket": "For better websocket client",
"cloudtay/ripple-mysql": "For better mysql client",
"cloudtay/ripple-guzzle": "For better guzzle client"
"cloudtay/ripple-rdo": "For better mysql client"
},
"minimum-stability": "dev",
"prefer-stable": true
Expand Down
52 changes: 0 additions & 52 deletions example/broadcast.php

This file was deleted.

15 changes: 0 additions & 15 deletions example/http-client.php

This file was deleted.

12 changes: 0 additions & 12 deletions example/http-proxy.php

This file was deleted.

51 changes: 0 additions & 51 deletions example/http-serve.php

This file was deleted.

48 changes: 0 additions & 48 deletions example/http-sse.php

This file was deleted.

12 changes: 0 additions & 12 deletions example/websocket-client.php

This file was deleted.

37 changes: 0 additions & 37 deletions example/websocket-server.php

This file was deleted.

41 changes: 7 additions & 34 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,36 +1,3 @@
<!--
~ Copyright (c) 2023-2024.
~
~ Permission is hereby granted, free of charge, to any person obtaining a copy
~ of this software and associated documentation files (the "Software"), to deal
~ in the Software without restriction, including without limitation the rights
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
~ copies of the Software, and to permit persons to whom the Software is
~ furnished to do so, subject to the following conditions:
~
~ The above copyright notice and this permission notice shall be included in all
~ copies or substantial portions of the Software.
~
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
~ SOFTWARE.
~
~ 特此免费授予任何获得本软件及相关文档文件(“软件”)副本的人,不受限制地处理
~ 本软件,包括但不限于使用、复制、修改、合并、出版、发行、再许可和/或销售
~ 软件副本的权利,并允许向其提供本软件的人做出上述行为,但须符合以下条件:
~
~ 上述版权声明和本许可声明应包含在本软件的所有副本或主要部分中。
~
~ 本软件按“原样”提供,不提供任何形式的保证,无论是明示或暗示的,
~ 包括但不限于适销性、特定目的的适用性和非侵权性的保证。在任何情况下,
~ 无论是合同诉讼、侵权行为还是其他方面,作者或版权持有人均不对
~ 由于软件或软件的使用或其他交易而引起的任何索赔、损害或其他责任承担责任。
-->

<phpunit bootstrap="vendor/autoload.php"
colors="true"
stopOnFailure="false"
Expand All @@ -41,7 +8,13 @@
processIsolation="true">
<testsuites>
<testsuite name="Core">
<directory>tests</directory>
<directory suffix=".php">tests</directory>
</testsuite>
</testsuites>

<coverage cacheDirectory=".phpunit.cache/code-coverage" processUncoveredFiles="true">
<include>
<directory suffix=".php">tests</directory>
</include>
</coverage>
</phpunit>
Loading

0 comments on commit 0046774

Please sign in to comment.