Test swoole-master for phpunit (#3503)

This commit is contained in:
李铭昕 2021-04-19 22:03:42 +08:00 committed by GitHub
parent b04ba5c9ae
commit 03c23b5ef8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 5 deletions

View File

@ -1,18 +1,23 @@
name: PHPUnit for Hyperf
on: [ push, pull_request ]
on:
push:
pull_request:
schedule:
- cron: '0 10 * * *'
jobs:
ci:
name: Test on PHP${{ matrix.php-version }} SW${{ matrix.sw-version }} MySQL${{ matrix.mysql-version }}
name: Test on PHP${{ matrix.php-version }} Swoole-${{ matrix.sw-version }} MySQL${{ matrix.mysql-version }}
runs-on: "${{ matrix.os }}"
strategy:
matrix:
os: [ ubuntu-latest ]
php-version: [ '7.3', '7.4' ]
mysql-version: [ '5.7', '8.0' ]
sw-version: [ '4.5.11', '4.6.4' ]
max-parallel: 8
sw-version: [ 'v4.5.11', 'v4.6.5', 'master' ]
max-parallel: 12
fail-fast: false
env:
SW_VERSION: ${{ matrix.sw-version }}
YASD_VERSION: 'v0.3.7'
@ -31,7 +36,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev
wget https://github.com/swoole/swoole-src/archive/v${SW_VERSION}.tar.gz -O swoole.tar.gz
wget https://github.com/swoole/swoole-src/archive/${SW_VERSION}.tar.gz -O swoole.tar.gz
mkdir -p swoole
tar -xf swoole.tar.gz -C swoole --strip-components=1
rm swoole.tar.gz

View File

@ -48,3 +48,10 @@ $client = $builder->setHosts(['http://127.0.0.1:9200'])->build();
$info = $client->info();
```
### 如何设置用户名密码
当搜索引擎需要使用用户名和密码时,比如购买了 `Elasticsearch` 企业版,我们可以使用以下 `host` 访问搜索引擎。
```
http://username:password@xxxx.aliyuncs.com:9200
```