Skip to content

Commit 558190c

Browse files
committed
ci: 添加 phpunit.xml.dist 配置文件
1 parent 46882c3 commit 558190c

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ jobs:
4545
run: composer install --prefer-dist --no-progress --no-interaction
4646

4747
- name: Run tests
48-
run: ./vendor/bin/phpunit --no-coverage
48+
run: ./vendor/bin/phpunit -c phpunit.xml.dist --no-coverage

phpunit.xml.dist

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
4+
bootstrap="tests/bootstrap.php"
5+
colors="true"
6+
executionOrder="depends,defects"
7+
beStrictAboutOutputDuringTests="true"
8+
beStrictAboutTodoAnnotatedTests="true"
9+
failOnRisky="true"
10+
failOnWarning="true">
11+
<testsuites>
12+
<testsuite name="Unit">
13+
<directory suffix="Test.php">./tests/Cases</directory>
14+
</testsuite>
15+
</testsuites>
16+
<coverage processUncoveredFiles="true">
17+
<include>
18+
<directory suffix=".php">./src</directory>
19+
</include>
20+
</coverage>
21+
<php>
22+
<ini name="memory_limit" value="1G"/>
23+
<ini name="date.timezone" value="UTC"/>
24+
</php>
25+
</phpunit>

0 commit comments

Comments
 (0)