mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-02 11:48:08 +08:00
Setup yasd int Github Actions (#3097)
* Setup yasd * Update * Update PipelineTest.php
This commit is contained in:
parent
a11748003e
commit
65b33f5b1e
17
.github/workflows/test.yml
vendored
17
.github/workflows/test.yml
vendored
@ -15,6 +15,7 @@ jobs:
|
||||
max-parallel: 4
|
||||
env:
|
||||
SW_VERSION: ${{ matrix.sw-version }}
|
||||
YASD_VERSION: 'v0.3.5'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
@ -26,8 +27,22 @@ jobs:
|
||||
extensions: redis
|
||||
ini-values: extension=swoole, opcache.enable_cli=1
|
||||
coverage: none
|
||||
- name: Build Swoole
|
||||
- name: Setup Swoole
|
||||
run: ./.travis/swoole.install.sh
|
||||
- name: Setup Yasd
|
||||
run: |
|
||||
sudo apt-get install libboost-all-dev
|
||||
wget https://github.com/swoole/yasd/archive/${YASD_VERSION}.tar.gz -O yasd.tar.gz
|
||||
mkdir -p yasd
|
||||
tar -xf yasd.tar.gz -C yasd --strip-components=1
|
||||
rm yasd.tar.gz
|
||||
cd yasd
|
||||
phpize
|
||||
./configure
|
||||
make -j$(nproc)
|
||||
sudo make install
|
||||
sudo sh -c "echo extension=yasd > /etc/php/${{ matrix.php-version }}/cli/conf.d/yasd.ini"
|
||||
php --ri yasd
|
||||
- name: Setup Packages
|
||||
run: composer update -o
|
||||
- name: Setup Services
|
||||
|
@ -17,6 +17,7 @@ use HyperfTest\Di\Stub\Aspect\NoProcessAspect;
|
||||
use Mockery;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use function Yasd\Zval\getRefCount;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
@ -44,12 +45,6 @@ class PipelineTest extends TestCase
|
||||
});
|
||||
|
||||
$this->assertTrue($res);
|
||||
|
||||
ob_start();
|
||||
debug_zval_dump($pipeline);
|
||||
$data = ob_get_clean();
|
||||
|
||||
preg_match('/refcount\((\d+)\)/U', $data, $res);
|
||||
$this->assertEquals(2, $res[1]);
|
||||
$this->assertEquals(2, getRefCount($pipeline));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user