fix: log pytest #8
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
# .github/workflows/ci.yml | |
name: CI | |
# 触发条件:每次 push 到主分支或每次创建 Pull Request 时触发 | |
on: | |
push: | |
branches: | |
- master # 或你使用的其他分支名 | |
pull_request: | |
branches: | |
- master # 或你使用的其他分支名 | |
# 工作流的任务 | |
jobs: | |
test: | |
runs-on: ubuntu-latest # 选择运行环境 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 # 检出代码 | |
- name: Set up Python | |
uses: actions/setup-python@v5 # 设置 Python 环境 | |
with: | |
python-version: '3.11' # 选择 Python 版本 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt # 安装依赖 | |
- name: Run pytest | |
run: | | |
pytest # 运行测试 |