Skip to content

Commit e5955ed

Browse files
author
InJune
committed
add ci.yml
1 parent 5a45aa8 commit e5955ed

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Python单元测试
2+
on: [push, pull_request] # 推送或提PR时触发
3+
jobs:
4+
test:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: 检出代码
8+
uses: actions/checkout@v4
9+
- name: 设置Python
10+
uses: actions/setup-python@v5
11+
with:
12+
python-version: '3.11'
13+
- name: 安装依赖
14+
run: |
15+
python -m pip install --upgrade pip
16+
pip install pytest
17+
- name: 运行测试
18+
run: pytest -v

0 commit comments

Comments
 (0)