docs: 优化 README.md 格式和排版 #104
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: CI | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| jobs: | |
| PHPUnit: | |
| name: PHPUnit (PHP ${{ matrix.php }}, RabbitMQ ${{ matrix.rabbitmq-v }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| php: | |
| - "8.5" | |
| - "8.4" | |
| - "8.3" | |
| - "8.2" | |
| - "8.1" | |
| rabbitmq-v: | |
| - "3.13-management" | |
| - "3.12-management" | |
| - "3.11-management" | |
| - "3.10-management" | |
| services: | |
| rabbitmq: | |
| image: rabbitmq:${{ matrix.rabbitmq-v }} | |
| ports: | |
| - 5672:5672 | |
| - 15672:15672 | |
| options: >- | |
| --health-cmd="rabbitmqctl status" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=5 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| tools: composer:v2 | |
| coverage: none | |
| - run: composer install | |
| # 等待 RabbitMQ 服务健康检查通过 | |
| - run: | | |
| echo "Waiting for RabbitMQ to be ready..." | |
| for i in {1..10}; do | |
| nc -z localhost 5672 && echo "RabbitMQ is up!" && exit 0 | |
| sleep 5 | |
| done | |
| echo "RabbitMQ did not start in time" && exit 1 | |
| - run: php tests/tester start |