Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3f94566

Browse files
authored
Update main.yml
1 parent 0205522 commit 3f94566

1 file changed

Lines changed: 3 additions & 16 deletions

File tree

.github/workflows/main.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
1-
# ... (前面的部分都正確)
2-
      - name: Run tests
3-
        run: |
4-
          # 運行 Python 測試。這裡以 pytest 為例,請根據您的測試框架調整
5-
          pip install pytest # 如果測試依賴 pytest,需要先安裝
6-
          pytest # 執行 pytest
7-
# ... (在 Run tests 之前或之後)
8-
- name: Run Linter # <--- 應該和上面的 "- name: Run tests" 對齊
9-
  run: |
10-
    pip install flake8 # 安裝 flake8
11-
    flake8 . # 執行 flake8 檢查
12-
```Run Linter` 這個步驟應該是 `steps:` 列表中的一個元素,所以它前面的 `- name` 應該和 `Set up Python`、`Install dependencies`、`Run tests` 等步驟的 `- name` 對齊。
13-
14-
### 正確的 YAML 設定檔應該是這樣:
15-
16-
```yaml
1+
### YML 設定檔:
2+
3+
174
name: CI
185

196
on:

0 commit comments

Comments
 (0)