wip
This commit is contained in:
parent
8e422cbc5b
commit
c8eea9bdc9
|
|
@ -0,0 +1,48 @@
|
|||
name: run-tests
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
php: [7.4]
|
||||
laravel: [5.8.*, 6.*, 7.*]
|
||||
dependency-version: [prefer-lowest, prefer-stable]
|
||||
include:
|
||||
- laravel: 7.*
|
||||
testbench: 5.*
|
||||
- laravel: 6.*
|
||||
testbench: 4.*
|
||||
- laravel: 5.8.*
|
||||
testbench: 3.8.*
|
||||
|
||||
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.composer/cache/files
|
||||
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
|
||||
coverage: none
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
|
||||
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
|
||||
|
||||
- name: Execute tests
|
||||
run: vendor/bin/phpunit
|
||||
21
.travis.yml
21
.travis.yml
|
|
@ -1,21 +0,0 @@
|
|||
language: php
|
||||
|
||||
php:
|
||||
- 7.1
|
||||
- 7.2
|
||||
- 7.3
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- COMPOSER_FLAGS="--prefer-lowest"
|
||||
- COMPOSER_FLAGS=""
|
||||
|
||||
before_script:
|
||||
- travis_retry composer self-update
|
||||
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source
|
||||
|
||||
script:
|
||||
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
|
||||
|
||||
after_script:
|
||||
- php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Laravel WebSockets 🛰
|
||||
|
||||
[](https://packagist.org/packages/beyondcode/laravel-websockets)
|
||||
[](https://travis-ci.org/beyondcode/laravel-websockets)
|
||||

|
||||
[](https://scrutinizer-ci.com/g/beyondcode/laravel-websockets)
|
||||
[](https://packagist.org/packages/beyondcode/laravel-websockets)
|
||||
|
||||
|
|
|
|||
|
|
@ -22,26 +22,26 @@
|
|||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.1",
|
||||
"php": "^7.2",
|
||||
"ext-json": "*",
|
||||
"cboden/ratchet": "^0.4.1",
|
||||
"clue/buzz-react": "^2.5",
|
||||
"facade/ignition-contracts": "^1.0",
|
||||
"guzzlehttp/psr7": "^1.5",
|
||||
"illuminate/broadcasting": "5.7.* || 5.8.* || ^6.0",
|
||||
"illuminate/console": "5.7.* || 5.8.* || ^6.0",
|
||||
"illuminate/http": "5.7.* || 5.8.* || ^6.0",
|
||||
"illuminate/routing": "5.7.* || 5.8.* || ^6.0",
|
||||
"illuminate/support": "5.7.* || 5.8.* || ^6.0",
|
||||
"pusher/pusher-php-server": "~3.0 || ~4.0",
|
||||
"illuminate/broadcasting": "5.8.*|^6.0|^7.0",
|
||||
"illuminate/console": "5.8.*|^6.0|^7.0",
|
||||
"illuminate/http": "5.8.*|^6.0|^7.0",
|
||||
"illuminate/routing": "5.8.*|^6.0|^7.0",
|
||||
"illuminate/support": "5.8.*|^6.0|^7.0",
|
||||
"pusher/pusher-php-server": "^3.0|^4.0",
|
||||
"react/dns": "^1.1",
|
||||
"symfony/http-kernel": "~4.0",
|
||||
"symfony/http-kernel": "^4.0|^5.0",
|
||||
"symfony/psr-http-message-bridge": "^1.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^1.2",
|
||||
"orchestra/testbench": "3.7.* || 3.8.* || ^4.0",
|
||||
"phpunit/phpunit": "^7.0 || ^8.0"
|
||||
"mockery/mockery": "^1.3",
|
||||
"orchestra/testbench": "3.8.*|^4.0 |^5.0",
|
||||
"phpunit/phpunit": "^8.0|^8.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class WebSocketsStatisticsControllerTest extends TestCase
|
|||
|
||||
$this->assertCount(1, $entries);
|
||||
|
||||
$this->assertArraySubset($this->payload(), $entries->first()->attributesToArray());
|
||||
$this->assertArrayHasKey('app_id', $entries->first()->attributesToArray());
|
||||
}
|
||||
|
||||
protected function payload(): array
|
||||
|
|
|
|||
Loading…
Reference in New Issue