mirror of
http://124.126.16.154:8888/singularity/hdk-pay.git
synced 2026-01-15 02:15:07 +08:00
ci: 添加测试相关的CI脚本
添加多个测试脚本用于CI流程,包括完整CI流程、Phpspec测试、静态分析、所有测试、代码风格修复与检查以及单元测试
This commit is contained in:
6
scripts/test/all-tests.sh
Executable file
6
scripts/test/all-tests.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# 运行所有 Pest 测试脚本
|
||||
|
||||
# 运行所有 Pest 测试(包括数据库测试)
|
||||
./run-in-docker.sh vendor/bin/pest --coroutine --prepend=tests/bootstrap.php --colors=always
|
||||
6
scripts/test/ci.sh
Executable file
6
scripts/test/ci.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# 完整的 CI 流程脚本
|
||||
|
||||
# 运行完整的 CI 流程
|
||||
./run-in-docker.sh composer ci
|
||||
6
scripts/test/code-style-check.sh
Executable file
6
scripts/test/code-style-check.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# 代码风格检查脚本
|
||||
|
||||
# 检查代码风格,只使用配置文件中定义的规则
|
||||
./run-in-docker.sh vendor/bin/php-cs-fixer check app/ --allow-risky=yes --config=.php-cs-fixer.dist.php
|
||||
6
scripts/test/code-style-fix.sh
Executable file
6
scripts/test/code-style-fix.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# 代码风格修复脚本
|
||||
|
||||
# 修复代码风格,只使用配置文件中定义的规则
|
||||
./run-in-docker.sh vendor/bin/php-cs-fixer fix app/ tests/ --allow-risky=yes --config=.php-cs-fixer.dist.php
|
||||
6
scripts/test/phpspec-tests.sh
Executable file
6
scripts/test/phpspec-tests.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Phpspec BDD 测试脚本
|
||||
|
||||
# 运行所有 Phpspec 测试
|
||||
./run-in-docker.sh vendor/bin/phpspec run
|
||||
6
scripts/test/static-analysis.sh
Executable file
6
scripts/test/static-analysis.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# 代码静态分析脚本
|
||||
|
||||
# 运行完整的代码静态分析
|
||||
./run-in-docker.sh vendor/bin/phpstan analyse app/ tests/
|
||||
6
scripts/test/unit-tests.sh
Executable file
6
scripts/test/unit-tests.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# 非数据库依赖的单元测试脚本
|
||||
|
||||
# 运行非数据库依赖的单元测试
|
||||
./run-in-docker.sh vendor/bin/pest tests/Unit/ --exclude-group database --coroutine --prepend=tests/bootstrap.php --colors=always
|
||||
Reference in New Issue
Block a user