Use PHP8 attributes instead of comments for ErrorCode
.
#337
Workflow file for this run
This file contains 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 for Hyperf | |
on: [ push, pull_request ] | |
jobs: | |
ci: | |
name: Test on PHP ${{ matrix.php-version }} Swoole ${{ matrix.swoole-version }} | |
runs-on: '${{ matrix.os }}' | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
php-version: [ '8.1', '8.2', '8.3' ] | |
swoole-version: [ 'v5.0.3', 'v5.1.2', 'master' ] | |
exclude: | |
- php-version: '8.3' | |
swoole-version: 'v5.0.3' | |
max-parallel: 9 | |
env: | |
SW_VERSION: ${{ matrix.swoole-version }} | |
PHP_VERSION: ${{ matrix.php-version }} | |
PHP_CS_FIXER_IGNORE_ENV: 1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
tools: phpize | |
ini-values: opcache.enable_cli=0 | |
coverage: none | |
extensions: pdo, pdo_mysql, redis | |
- name: Setup Swoole | |
run: ./.github/swoole.install.sh | |
- name: Setup MySQL ... | |
run: | | |
docker run -e TZ=Asia/Shanghai -e MYSQL_ALLOW_EMPTY_PASSWORD=true -e MYSQL_ROOT_HOST=% -e MYSQL_DATABASE=hyperf -v $PWD/.github/init.sql:/docker-entrypoint-initdb.d/init.sql -d -p 3306:3306 --name mysql mysql/mysql-server:5.7 | |
docker run -p 6379:6379 -d --name redis redis:latest | |
- name: Show Environment | |
run: | | |
php -v | |
php -m | |
php -i | |
- name: Setup Packages | |
run: composer update -o | |
- name: Run Test Cases | |
run: | | |
cp .env.example .env | |
vendor/bin/php-cs-fixer fix --dry-run | |
composer analyse | |
composer test -- --exclude-group OpenSSL |