Skip to content

Commit 5706d2f

Browse files
bobbravo2nsingla
andcommitted
Simplify Python workflow - use paths trigger instead of filter action
Apply suggestion from @nsingla: - Remove detect-python-changes job - Use on.push.paths and on.pull_request.paths directly - Simpler implementation with same functionality - Reduces workflow complexity and job count Benefits: - One less job to execute - Clearer trigger conditions in workflow file - GitHub handles path filtering natively - Added workflow file itself to paths (self-trigger on changes) Co-authored-by: nsingla <nsingla@users.noreply.github.com>
1 parent 23a60a9 commit 5706d2f

File tree

1 file changed

+11
-21
lines changed

1 file changed

+11
-21
lines changed

.github/workflows/python-test.yml

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,23 @@ name: Python Test and Coverage
33
on:
44
push:
55
branches: [main]
6+
paths:
7+
- 'components/runners/claude-code-runner/**/*.py'
8+
- 'components/runners/claude-code-runner/pyproject.toml'
9+
- 'components/runners/claude-code-runner/uv.lock'
10+
- '.github/workflows/python-test.yml'
611
pull_request:
712
branches: [main]
13+
paths:
14+
- 'components/runners/claude-code-runner/**/*.py'
15+
- 'components/runners/claude-code-runner/pyproject.toml'
16+
- 'components/runners/claude-code-runner/uv.lock'
17+
- '.github/workflows/python-test.yml'
818
workflow_dispatch:
919

1020
jobs:
11-
detect-python-changes:
12-
runs-on: ubuntu-latest
13-
outputs:
14-
runner: ${{ steps.filter.outputs.runner }}
15-
steps:
16-
- name: Checkout code
17-
uses: actions/checkout@v5
18-
19-
- name: Check for Python changes
20-
uses: dorny/paths-filter@v3
21-
id: filter
22-
with:
23-
filters: |
24-
runner:
25-
- 'components/runners/claude-code-runner/**/*.py'
26-
- 'components/runners/claude-code-runner/pyproject.toml'
27-
- 'components/runners/claude-code-runner/uv.lock'
28-
2921
test-runner:
3022
runs-on: ubuntu-latest
31-
needs: detect-python-changes
32-
if: needs.detect-python-changes.outputs.runner == 'true' || github.event_name == 'workflow_dispatch'
3323
steps:
3424
- name: Checkout code
3525
uses: actions/checkout@v5
@@ -75,7 +65,7 @@ jobs:
7565

7666
test-summary:
7767
runs-on: ubuntu-latest
78-
needs: [detect-python-changes, test-runner]
68+
needs: [test-runner]
7969
if: always()
8070
steps:
8171
- name: Check overall status

0 commit comments

Comments
 (0)