Skip to content

Commit c670905

Browse files
committed
update some
1 parent 06674aa commit c670905

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

.github/workflows/php.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false # dont fast fail
1313
matrix:
14-
php: [7.1, 7.2, 7.3, 7.4]
14+
php: [7.1] # , 7.2, 7.3, 7.4
1515
os: [ubuntu-latest, windows-latest, macOS-latest]
1616

1717
steps:
@@ -26,9 +26,8 @@ jobs:
2626
coverage: none #optional, setup coverage driver: xdebug, none
2727
pecl: true
2828

29-
- name: Install extensions
30-
run: |
31-
php -m
29+
- name: Display Env
30+
run: env
3231
# sudo pecl update-channels && pecl install -f msgpack && pecl install -f igbinary && php -m
3332

3433
- name: Install dependencies

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
}
3434
},
3535
"scripts": {
36-
"test": "./vendor/bin/phpunit"
36+
"test": "vendor/bin/phpunit"
3737
},
3838
"suggest": {
3939
"inhere/php-validate": "Very lightweight data validate tool",

test/ColorTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ class ColorTest extends TestCase
1414
{
1515
public function testRender(): void
1616
{
17+
if (!Cli::isSupportColor()) {
18+
return;
19+
}
20+
1721
$text = Color::render('text', 'info');
1822
$this->assertStringContainsString(Color::STYLES['info'], $text);
1923

@@ -32,6 +36,10 @@ public function testRender(): void
3236

3337
public function testApply(): void
3438
{
39+
if (!Cli::isSupportColor()) {
40+
return;
41+
}
42+
3543
$text = Color::apply('info', 'text');
3644
$this->assertStringContainsString(Color::STYLES['info'], $text);
3745

0 commit comments

Comments
 (0)