From 44ea6ceeee1692deb81f75196b7119f7f94f8bc5 Mon Sep 17 00:00:00 2001 From: yanglbme Date: Sun, 28 Nov 2021 11:44:58 +0800 Subject: [PATCH] chore: update test case --- test.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/test.py b/test.py index 4e04e7f..3523483 100644 --- a/test.py +++ b/test.py @@ -2,6 +2,7 @@ from actions_toolkit import core +from app import log from app.action import Action os.environ['INPUT_GITEE-USERNAME'] = 'yanglbme' @@ -9,10 +10,13 @@ os.environ['INPUT_GITEE-REPO'] = 'yanglbme/reading' os.environ['INPUT_BRANCH'] = 'main' -username = core.get_input('gitee-username', required=True) -password = core.get_input('gitee-password', required=True) -repo = core.get_input('gitee-repo', required=True) -branch = core.get_input('branch') +try: + username = core.get_input('gitee-username', required=True) + password = core.get_input('gitee-password', required=True) + repo = core.get_input('gitee-repo', required=True) + branch = core.get_input('branch') -action = Action(username, password, repo, branch) -action.run() + action = Action(username, password, repo, branch) + action.run() +except Exception as e: + log.set_failed(str(e))