Skip to content

Commit 1abd07f

Browse files
authored
Update python-app.yml
1 parent bdd87c5 commit 1abd07f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

.github/workflows/python-app.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,25 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
# 1. 检出代码
1817
- uses: actions/checkout@v4
1918

20-
# 2. 设置 Python 3.10
2119
- name: Set up Python 3.10
2220
uses: actions/setup-python@v3
2321
with:
2422
python-version: "3.10"
2523

26-
# 3. 安装依赖(包含你的 app.py 所需包)
24+
# 关键修复:确保安装 flake8
2725
- name: Install dependencies
2826
run: |
2927
python -m pip install --upgrade pip
28+
pip install flake8 # 显式安装 flake8
3029
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
3130
32-
# 4. 可选:代码规范检查(如果需要保留)
31+
# Lint 步骤现在可以找到 flake8 了
3332
- name: Lint with flake8
3433
run: |
3534
flake8 . --count --exit-zero --max-line-length=127 --statistics
3635
37-
# 5. 运行 app.py
3836
- name: Run app.py
3937
run: |
4038
python app.py

0 commit comments

Comments
 (0)