generated from actions/typescript-action
-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 插件测试中使用 uv 来控制 Python 版本并与本体共享依赖 (#320)
* build: nonetest 现在与 noneflow 共享依赖 * feat: 使用 uv 来安装对应版本的 Python * test: 修复测试 * docs: 添加更新日志 * ci: 删除独立的 workflow * build: 升级 uv 版本和调整 poetry 安装顺序 * fix: 修复获取的 Python 版本不是测试环境中的问题 * refactor: 用直接导入代替环境变量并使用 httpx * refactor: 使用 jinja 来渲染加载测试脚本并调整运行方法 * fix: 将工作目录设置为 /app * refactor: 稍微调整一下环境变量传入的顺序 * refactor: 不提供默认 Python 版本 * test: 修复网页请求没 mock 的问题 * refactor: 并发读取 Python 版本 * refactor: 调整 DockerTestResult 的默认值
- Loading branch information
Showing
20 changed files
with
443 additions
and
263 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import asyncio | ||
import os | ||
|
||
from .plugin_test import PluginTest | ||
|
||
|
||
def main(): | ||
"""根据传入的环境变量进行测试 | ||
PYTHON_VERSION 为运行测试的 Python 版本 | ||
PROJECT_LINK 为插件的项目名 | ||
MODULE_NAME 为插件的模块名 | ||
PLUGIN_CONFIG 为该插件的配置 | ||
""" | ||
python_version = os.environ.get("PYTHON_VERSION", "") | ||
|
||
project_link = os.environ.get("PROJECT_LINK", "") | ||
module_name = os.environ.get("MODULE_NAME", "") | ||
plugin_config = os.environ.get("PLUGIN_CONFIG", None) | ||
|
||
plugin = PluginTest(python_version, project_link, module_name, plugin_config) | ||
|
||
asyncio.run(plugin.run()) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
Oops, something went wrong.