diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0b79e5a..93a2b9a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,10 +1,13 @@ -name: "tests" +name: tests -on: [ push, pull_request ] +on: + - push + - pull_request jobs: test: timeout-minutes: 3 + runs-on: ubuntu-22.04 strategy: @@ -21,10 +24,10 @@ jobs: laravel: 11 - php: 8.3 laravel: 9 - - php: 8.0 - laravel: 12 - - php: 8.1 - laravel: 12 + - laravel: 12 + php: '8.0' + - laravel: 12 + php: 8.1 name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} @@ -43,6 +46,7 @@ jobs: - name: Start Centrifugo run: docker run -d -p 8000:8000 -e CENTRIFUGO_TOKEN_HMAC_SECRET_KEY="secret" -e CENTRIFUGO_API_KEY="api-key" -e CENTRIFUGO_PRESENCE=1 -e CENTRIFUGO_JOIN_LEAVE=true -e CENTRIFUGO_FORCE_PUSH_JOIN_LEAVE=true -e CENTRIFUGO_HISTORY_TTL=300s -e CENTRIFUGO_HISTORY_SIZE=100 -e CENTRIFUGO_FORCE_RECOVERY=true -e CENTRIFUGO_USER_SUBSCRIBE_TO_PERSONAL=true -e CENTRIFUGO_ALLOW_PUBLISH_FOR_SUBSCRIBER=true -e CENTRIFUGO_ALLOW_PRESENCE_FOR_SUBSCRIBER=true -e CENTRIFUGO_ALLOW_HISTORY_FOR_SUBSCRIBER=true centrifugo/centrifugo:v5 centrifugo + - name: Check container status run: docker ps @@ -56,8 +60,8 @@ jobs: - name: Install dependencies run: | - composer require "illuminate/contracts=^${{ matrix.laravel }}" --no-update - composer update --prefer-dist --no-interaction --no-progress + composer require "illuminate/contracts=^${{ matrix.laravel }}" --no-update + composer update --prefer-dist --no-interaction --no-progress - name: PHPUnit Tests run: vendor/bin/phpunit diff --git a/composer.json b/composer.json index 3b3efad..23bc69c 100644 --- a/composer.json +++ b/composer.json @@ -1,64 +1,63 @@ { - "name" : "denis660/laravel-centrifugo", - "description" : "Centrifugo broadcaster for laravel", - "keywords" : [ - "laravel-broadcaster", - "broadcaster", - "laravel", - "centrifugo", - "web socket", - "web-socket", - "websocket", - "socket", - "real time" - ], - "license" : "MIT", - "authors" : [ - { - "name" : "Denis Zakharenko", - "email" : "amx-serv@ya.ru", - "role" : "Creator" - } - ], - "homepage" : "https://github.com/denis660/laravel-centrifugo", - "support" : { - "email" : "amx-serv@ya.ru", - "issues" : "https://github.com/denis660/laravel-centrifugo/issues", - "source" : "https://github.com/denis660/laravel-centrifugo" - }, - "require" : { - "php" : "^8.0", - "ext-json": "*", - "laravel/framework" : "^9.0|^10.0|^11.0|^12.0", - "guzzlehttp/guzzle" : "~6.0|^7.0" - }, - "require-dev" : { - "orchestra/testbench" : "^7.35|^8.14|^9.0", - "phpunit/phpunit" : "^9.3|^10.5" - }, - "autoload" : { - "psr-4" : { - "denis660\\Centrifugo\\" : "src/" - } - }, - "autoload-dev" : { - "psr-4" : { - "denis660\\Centrifugo\\Test\\" : "tests/" - } - }, - "extra" : { - "laravel" : { - "providers" : [ - "denis660\\Centrifugo\\CentrifugoServiceProvider" - ] - } - }, - "config" : { - "sort-packages" : true - }, - "minimum-stability" : "dev", - "prefer-stable" : true, - "scripts" : { - "test" : "phpunit" - } -} + "name": "denis660/laravel-centrifugo", + "description": "Centrifugo broadcaster for laravel", + "keywords": [ + "laravel-broadcaster", + "broadcaster", + "laravel", + "centrifugo", + "web socket", + "web-socket", + "websocket", + "socket", + "real time" + ], + "license": "MIT", + "authors": [ + { + "name": "Denis Zakharenko", + "email": "amx-serv@ya.ru", + "role": "Creator" + } + ], + "homepage": "https://github.com/denis660/laravel-centrifugo", + "support": { + "email": "amx-serv@ya.ru", + "issues": "https://github.com/denis660/laravel-centrifugo/issues", + "source": "https://github.com/denis660/laravel-centrifugo" + }, + "require": { + "php": "^8.0", + "ext-json": "*", + "laravel/framework": "^9.0|^10.0|^11.0|^12.0", + "guzzlehttp/guzzle": "~6.0|^7.0" + }, + "require-dev": { + "orchestra/testbench": "^7.35|^8.14|^9.0|^10.0", + "phpunit/phpunit": "^9.3|^10.5|^11.5.3" + }, + "autoload": { + "psr-4": { + "denis660\\Centrifugo\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "denis660\\Centrifugo\\Test\\": "tests/" + } + }, + "extra": { + "laravel": { + "providers": [ + "denis660\\Centrifugo\\CentrifugoServiceProvider" + ] + } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev", + "prefer-stable": true, + "scripts": { + "test": "phpunit" + } \ No newline at end of file