Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit 4db6c7e

Browse files
authored
Merge pull request #518 from alecpl/dev/laravel-v9
Support Laravel v9 + Github Actions
2 parents 43d0878 + 2be1bc1 commit 4db6c7e

File tree

7 files changed

+58
-15
lines changed

7 files changed

+58
-15
lines changed

.github/workflows/tests.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
linux_tests:
9+
runs-on: ubuntu-latest
10+
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
11+
12+
strategy:
13+
fail-fast: true
14+
matrix:
15+
include:
16+
- php: "7.3"
17+
framework: "laravel/framework:^8.0"
18+
- php: "7.4"
19+
framework: "laravel/framework:^8.0"
20+
- php: "8.0"
21+
framework: "laravel/framework:^8.0"
22+
- php: "8.0"
23+
framework: "laravel/framework:^9.0"
24+
25+
name: PHP ${{ matrix.php }} (${{ matrix.framework }})
26+
27+
steps:
28+
- name: Setup PHP
29+
uses: shivammathur/setup-php@v2
30+
with:
31+
php-version: ${{ matrix.php }}
32+
extensions: swoole
33+
34+
- name: Checkout code
35+
uses: actions/checkout@v2
36+
37+
- name: Install dependencies
38+
run: |
39+
composer require ${{ matrix.framework }} --no-update -n
40+
COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist -n -o
41+
42+
- name: Execute tests
43+
run: vendor/bin/phpunit

.scrutinizer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
build:
22
environment:
3-
php: 7.2
3+
php: 7.3
44

55
filter:
66
excluded_paths:

composer.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@
2222
],
2323
"require": {
2424
"php": "^7.2|^8.0",
25-
"illuminate/console": "~5.4|~6.0|~7.0|~8.0",
26-
"illuminate/contracts": "~5.4|~6.0|~7.0|~8.0",
27-
"illuminate/http": "~5.4|~6.0|~7.0|~8.0",
28-
"illuminate/support": "~5.4|~6.0|~7.0|~8.0",
25+
"illuminate/console": "~5.4|~6.0|~7.0|~8.0|~9.0",
26+
"illuminate/contracts": "~5.4|~6.0|~7.0|~8.0|~9.0",
27+
"illuminate/http": "~5.4|~6.0|~7.0|~8.0|~9.0",
28+
"illuminate/support": "~5.4|~6.0|~7.0|~8.0|~9.0",
2929
"predis/predis": "^1.1"
3030
},
3131
"require-dev": {
32-
"laravel/lumen-framework": "~5.4|~6.0|~7.0|~8.0",
33-
"phpunit/phpunit": "^7.5",
34-
"phpunit/php-code-coverage": "^6.1",
32+
"laravel/lumen-framework": "~5.4|~6.0|~7.0|~8.0|~9.0",
33+
"phpunit/phpunit": "^9",
34+
"phpunit/php-code-coverage": "^9",
3535
"php-coveralls/php-coveralls": "^2.1",
36-
"mockery/mockery": "~1.0",
37-
"codedungeon/phpunit-result-printer": "^0.14.0",
38-
"php-mock/php-mock": "^2.0",
36+
"mockery/mockery": "~1.5",
37+
"codedungeon/phpunit-result-printer": "^0.31.0",
38+
"php-mock/php-mock": "^2.3",
3939
"swoole/ide-helper": "@dev"
4040
},
4141
"autoload": {

tests/Coroutine/ConnectorFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515
class ConnectorFactoryTest extends TestCase
1616
{
17-
public function setUp()
17+
public function setUp(): void
1818
{
1919
parent::setUp();
2020
$this->mockEnv('Laravel\Lumen');

tests/Task/QueueFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
class QueueFactoryTest extends TestCase
1717
{
18-
public function setUp()
18+
public function setUp(): void
1919
{
2020
parent::setUp();
2121
$this->mockEnv('Laravel\Lumen');

tests/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
class TestCase extends BaseTestCase
1313
{
14-
public function tearDown()
14+
public function tearDown(): void
1515
{
1616
$this->addToAssertionCount(
1717
m::getContainer()->mockery_getExpectationCount()

tests/Websocket/TableRoomTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class TableRoomTest extends TestCase
1111
{
1212
protected $tableRoom;
1313

14-
public function setUp()
14+
public function setUp(): void
1515
{
1616
$config = [
1717
'room_rows' => 4096,

0 commit comments

Comments
 (0)