功能增加&修复一些已知问题,详见描述 #127
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PHPUnit | |
| on: [ push, pull_request ] | |
| env: | |
| SWOOLE_VERSION: '5.1.5' | |
| SWOW_VERSION: 'v1.2.0' | |
| jobs: | |
| ci: | |
| name: Test PHP ${{ matrix.php-version }} on ${{ matrix.engine }} | |
| runs-on: "${{ matrix.os }}" | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest ] | |
| php-version: [ '8.1', '8.2', '8.3' ] | |
| engine: [ 'none', 'swoole', 'swow' ] | |
| max-parallel: 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| extensions: >- | |
| ${{ matrix.engine == 'swoole' && 'swoole' || '' }} | |
| ${{ matrix.engine == 'swow' && 'swow' || '' }} | |
| tools: phpize | |
| ini-values: opcache.enable_cli=0 | |
| coverage: none | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Packages | |
| run: composer update -o --no-scripts | |
| - name: Install Engine Dependencies | |
| run: | | |
| if [ "${{ matrix.engine }}" = "swow" ]; then | |
| echo "Installing hyperf/engine-swow for Swow environment" | |
| composer require hyperf/engine-swow:^2.12 --no-scripts --dev | |
| elif [ "${{ matrix.engine }}" = "swoole" ]; then | |
| echo "Installing hyperf/engine for Swoole environment" | |
| composer require hyperf/engine:^2.14 --no-scripts --dev | |
| else | |
| echo "No specific engine dependencies needed for 'none' environment" | |
| fi | |
| - name: Run Test Cases | |
| run: | | |
| vendor/bin/php-cs-fixer fix --dry-run | |
| composer analyse | |
| composer test |