mirror of
https://github.com/PaiGramTeam/MibooGram.git
synced 2024-11-16 04:45:27 +00:00
👷 CI 添加缓存
This commit is contained in:
parent
e935d04082
commit
262ae70d66
29
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
29
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
## 该 PR 相关 Issue / Involved issue
|
||||
|
||||
Close #
|
||||
|
||||
## 描述 / Description
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
## 更改检查表 / Change Checklist
|
||||
|
||||
- [ ] 有插件命令更新
|
||||
- [ ] 已更新 bot 帮助文件
|
||||
- [ ] 有流程交互
|
||||
- [ ] 指引明确
|
||||
- [ ] 可以退出
|
||||
- [ ] 会触发频率限制
|
||||
- [ ] 有对应的限制措施
|
||||
- [ ] 需要用户输入数据
|
||||
- [ ] 验证用户数据
|
||||
- [ ] 如果是文件,检查了文件大小
|
||||
- [ ] 对保存的数据再次进行了验证
|
||||
- [ ] 添加了新的依赖包
|
||||
- [ ] 测试
|
||||
- [ ] 本地通过了测试
|
||||
- [ ] CI 通过了测试
|
||||
|
||||
## 说明 / Note
|
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
@ -32,12 +32,14 @@ jobs:
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install poetry
|
||||
- name: restore or create a python virtualenv
|
||||
id: cache
|
||||
uses: syphar/restore-virtualenv@v1.2
|
||||
- name: Create venv
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
pip install --upgrade poetry
|
||||
poetry config virtualenvs.create false
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
poetry install
|
||||
poetry install --extras test
|
||||
- name: Test with pytest
|
||||
|
@ -59,13 +59,17 @@ class GetChat(Plugin):
|
||||
except UserNotFoundError:
|
||||
user_info = None
|
||||
if user_info is not None:
|
||||
text += "米游社绑定:" if user_info.region == RegionEnum.HYPERION else "HOYOLAB 绑定:"
|
||||
if user_info.region == RegionEnum.HYPERION:
|
||||
text += "米游社绑定:"
|
||||
uid = user_info.yuanshen_uid
|
||||
else:
|
||||
text += "原神绑定:"
|
||||
uid = user_info.genshin_uid
|
||||
temp = "Cookie 绑定"
|
||||
try:
|
||||
await get_genshin_client(chat.id)
|
||||
except CookiesNotFoundError:
|
||||
temp = "UID 绑定"
|
||||
uid = user_info.genshin_uid or user_info.yuanshen_uid
|
||||
text += f"<code>{temp}</code>\n" \
|
||||
f"游戏 ID:<code>{uid}</code>"
|
||||
with contextlib.suppress(Exception):
|
||||
|
Loading…
Reference in New Issue
Block a user