Skip to content

use tcp check

use tcp check #39

Workflow file for this run

name: "test"
on: [push, pull_request]
jobs:
test:
name: Test with PHP ${{ matrix.php-version }}
runs-on: ubuntu-latest
# Prevent duplicate builds on internal PRs.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
matrix:
php-version: ["7.4", "8.0"]
steps:
- uses: "actions/checkout@v2"
- uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
- name: Composer install
uses: "ramsey/composer-install@v1"
- name: Start Centrifugo
run: docker run -d -p 8000:8000 centrifugo/centrifugo:latest centrifugo --api_insecure
- name: Check container status
run: docker ps
- uses: iFaxity/wait-on-action@v1
with:
resource: tcp://localhost:8000
timeout: 10000
- name: Run tests
run: vendor/bin/phpunit