Skip to content

Commit

Permalink
ci: test
Browse files Browse the repository at this point in the history
  • Loading branch information
MarleneJiang committed Aug 22, 2023
1 parent 228d7de commit 342f2b6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/actions_scripts/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@

import os
import subprocess
from pathlib import Path

from utils import set_action_outputs

pypi_name = os.environ["PYPI_NAME"]
module_name = os.environ["MODULE_NAME"]



current_directory = Path(__file__).parent
print("当前文件所在目录:", current_directory) # noqa: T201

def check_module(module_name: str) -> bool:
"""Check module name."""
import importlib
Expand All @@ -30,7 +36,7 @@ def alicebot_test() -> None:
try:

# 要执行的 Python 脚本路径
python_script_path = ".github/actions_scripts/plugin_test.py"
python_script_path = "plugin_test.py"
# 整个命令
command = f"python {python_script_path} {module_name}"
print(f"command: {command}")# noqa: T201
Expand Down Expand Up @@ -103,7 +109,7 @@ def get_meta_info() -> None:
alicebot_test()
except Exception as e: # noqa: BLE001
print(f"Exception: {e}")# noqa: T201
set_action_outputs({"result": "error", "output": str(e)})
set_action_outputs({"result": "error", "output": f"Exception: {e}"})
else:
print("get_meta_info")# noqa: T201
get_meta_info()

0 comments on commit 342f2b6

Please sign in to comment.