Skip to content

Commit

Permalink
单元测试
Browse files Browse the repository at this point in the history
  • Loading branch information
yunwuxin committed Dec 26, 2024
1 parent 0cfbbf2 commit 6dd6d49
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: tests
on:
push:
branches:
- 5.0
- "5.0"
pull_request:

jobs:
Expand All @@ -13,9 +13,9 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
php: ["8.1", "8.2", "8.3", "8.4"]
stability: [prefer-lowest, prefer-stable]
os: [ ubuntu-latest, macos-latest, windows-latest ]
php: [ "8.2", "8.3", "8.4" ]
stability: [ prefer-lowest, prefer-stable ]

name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
}
],
"require": {
"php": ">=8.2",
"workerman/workerman": "^4.2",
"topthink/framework": "^8.0"
},
Expand All @@ -29,7 +30,6 @@
},
"require-dev": {
"pestphp/pest": "^3.7",
"mockery/mockery": "^1.6",
"guzzlehttp/guzzle": "^7.0",
"phpstan/phpstan": "^2.0"
},
Expand Down
4 changes: 3 additions & 1 deletion tests/HttpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
beforeAll(function () use (&$process) {
$process = new Process(['php', 'think', 'worker'], __DIR__ . '/stub/');
$process->start();
usleep(250000);
while (!$process->getOutput()) {
sleep(1);
}
});

afterAll(function () use (&$process) {
Expand Down

0 comments on commit 6dd6d49

Please sign in to comment.