RabbitMQ Health Check fo test #9
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 | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "*.*.*" | |
pull_request: | |
branches: | |
- main | |
jobs: | |
Build: | |
runs-on: 'ubuntu-latest' | |
container: 'byjg/php:${{ matrix.php-version }}-cli' | |
strategy: | |
matrix: | |
php-version: | |
- "8.2" | |
- "8.1" | |
- "8.0" | |
- "7.4" | |
services: | |
rabbitmq: | |
image: rabbitmq:3-management | |
env: | |
RABBITMQ_DEFAULT_USER: guest | |
RABBITMQ_DEFAULT_PASS: guest | |
ports: | |
- "5672:5672" | |
options: >- | |
--health-cmd "rabbitmq-diagnostics status" | |
--health-interval "10s" | |
--health-timeout "1s" | |
--health-retries "5" | |
--health-start-period 15s | |
steps: | |
- uses: actions/checkout@v3 | |
- run: composer install | |
- run: ./vendor/bin/phpunit | |
# Documentation: | |
# runs-on: 'ubuntu-latest' | |
# needs: Build | |
# if: github.ref == 'refs/heads/main' | |
# env: | |
# DOC_GITHUB_TOKEN: '${{ secrets.DOC_TOKEN }}' | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - run: curl https://opensource.byjg.com/add-doc.sh | bash /dev/stdin php message-queue-client |