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 3dd848f commit d074664
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/actions_scripts/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ def alicebot_test() -> None:
if result.returncode != 0:
msg = f"脚本执行失败: {result.stdout}"
raise ValueError(msg) from None
except subprocess.TimeoutExpired:
raise
except subprocess.TimeoutExpired as e:
msg = f"脚本执行超时: {e.stdout}"
raise ValueError(msg) from e
except subprocess.CalledProcessError as e:
msg = f"Script execution failed with error code {e.returncode}"
raise ValueError(msg) from e
Expand All @@ -59,7 +60,7 @@ def get_meta_info() -> None:
return
author = metadata.get_all("Author")
if author is None:
email = metadata.get_all("author_email")
email = metadata.get_all("Author-email")
if email is not None and "<" in email[0]: # PDM发包问题
author = email[0].split("<")[0].strip()
else:
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,17 @@ jobs:
result: ${{ steps.test.outputs.result }}
output: ${{ steps.test.outputs.output }}
steps:
- name: Remove label parse-issue/failed
if: contains(github.event.issue.labels.*.name, 'parse-issue/failed')
uses: actions/github-script@v6
with:
script: |
github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: ["parse-issue/failed"]
})
- uses: actions/checkout@v3
# Set up Python 3.8 environment
- name: Set up Python 3.8
Expand Down

0 comments on commit d074664

Please sign in to comment.