Setup yasd int Github Actions (#3097)

* Setup yasd

* Update

* Update PipelineTest.php
This commit is contained in:
李铭昕 2021-01-09 21:19:28 +08:00 committed by GitHub
parent a11748003e
commit 65b33f5b1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 8 deletions

View File

@ -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

View File

@ -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));
}
}