Skip to content

Commit 4f8c2f0

Browse files
committed
Update ci.yml
1 parent 7a249e9 commit 4f8c2f0

1 file changed

Lines changed: 5 additions & 15 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,8 @@
88
name: CI/CD Pipeline
99

1010
on:
11-
push:
12-
branches: [ main, develop ]
13-
paths:
14-
- 'torch_rechub/**'
15-
- 'tutorials/**'
16-
- 'examples/**'
17-
- 'config/**'
18-
- 'tests/**'
19-
- 'pyproject.toml'
20-
- '.github/workflows/ci.yml'
2111
pull_request:
22-
branches: [ main, develop ]
12+
branches: [ main ]
2313
paths:
2414
- 'torch_rechub/**'
2515
- 'tutorials/**'
@@ -73,16 +63,16 @@ jobs:
7363
- name: Format & Lint
7464
run: |
7565
# 步骤1: isort
76-
isort --profile black torch_rechub/ examples/ tests/
66+
isort --profile black torch_rechub/ config/ examples/ tests/
7767
# 步骤2: yapf
7868
yapf_style="{based_on_style: google, column_limit: 248, join_multiple_lines: false, split_all_comma_separated_values: true, split_before_logical_operator: true, dedent_closing_brackets: true, align_closing_bracket_with_visual_indent: true, indent_width: 4}"
79-
yapf --in-place --recursive --style="$yapf_style" torch_rechub/ examples/ tests/
69+
yapf --in-place --recursive --style="$yapf_style" torch_rechub/ config/ examples/ tests/
8070
8171
# 步骤3: 检查工作区是否干净,确认所有格式化都已提交
8272
git diff --exit-code
8373
8474
# 步骤4: 运行flake8进行最终的代码质量检查
85-
flake8 --max-line-length=248 --extend-ignore=E203,W503,E501,E722,E402,F821,F523,E711,E741,F401,E265,C901,E301,E305,W293,E261,W291,W292,E111,E117,F841,E302 --max-complexity=30 torch_rechub/ examples/ tests/
75+
flake8 --max-line-length=248 --extend-ignore=E203,W503,E501,E722,E402,F821,F523,E711,E741,F401,E265,C901,E301,E305,W293,E261,W291,W292,E111,E117,F841,E302 --max-complexity=30 torch_rechub/ config/ examples/ tests/
8676
8777
- name: Type checking (MyPy) - Optional
8878
continue-on-error: true
@@ -408,4 +398,4 @@ jobs:
408398
dist/*.tar.gz
409399
fail_on_unmatched_files: true
410400
env:
411-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
401+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)