Skip to content

Commit a015db3

Browse files
committed
chore(ci): remove custom detect-changes action and replace with tj-actions/changed-files
Remove the custom GitHub Action for detecting file changes and replace it with the widely-used `tj-actions/changed-files` action. This change simplifies the maintenance of the CI configuration by leveraging a well-supported third-party action. It also ensures more reliable and up-to-date functionality for detecting file changes, which is crucial for optimizing CI workflows by skipping unnecessary jobs.
1 parent 4806733 commit a015db3

File tree

3 files changed

+30
-48
lines changed

3 files changed

+30
-48
lines changed

.github/actions/detect-changes/action.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,18 @@ jobs:
7272
contents: read # Required for checkout
7373
pull-requests: write # Required for Pyright annotations
7474
steps:
75-
# SMART CHANGE DETECTION WITH CHECKOUT
75+
# REPOSITORY CHECKOUT
76+
# Full history needed for accurate change detection
77+
- name: Checkout Repository
78+
uses: actions/checkout@v4
79+
with:
80+
fetch-depth: 0
81+
82+
# SMART CHANGE DETECTION
7683
# Detects Python file changes to skip unnecessary runs
7784
# Includes Python source, config files, and dependencies
7885
- name: Detect Python changes
79-
uses: ./.github/actions/detect-changes
86+
uses: tj-actions/changed-files@v45.0.8
8087
id: python_changes
8188
with:
8289
files: |
@@ -130,11 +137,16 @@ jobs:
130137
permissions:
131138
contents: read
132139
steps:
133-
# SMART CHANGE DETECTION WITH CHECKOUT
140+
# REPOSITORY CHECKOUT
141+
# Shallow clone sufficient for linting current state
142+
- name: Checkout Repository
143+
uses: actions/checkout@v4
144+
145+
# SMART CHANGE DETECTION
134146
# Only runs when documentation files change
135147
# Improves CI performance for code-only changes
136148
- name: Detect Markdown changes
137-
uses: ./.github/actions/detect-changes
149+
uses: tj-actions/changed-files@v45.0.8
138150
id: markdown_changes
139151
with:
140152
files: '**/*.md'
@@ -204,11 +216,16 @@ jobs:
204216
- type: Shell Scripts
205217
files: '**/*.sh,**/*.bash,scripts/**'
206218
steps:
207-
# SMART CHANGE DETECTION WITH CHECKOUT
219+
# REPOSITORY CHECKOUT
220+
# Shallow clone sufficient for infrastructure validation
221+
- name: Checkout Repository
222+
uses: actions/checkout@v4
223+
224+
# SMART CHANGE DETECTION
208225
# Each matrix job only runs if relevant files changed
209226
# Improves efficiency by skipping unchanged categories
210227
- name: Detect ${{ matrix.type }} changes
211-
uses: ./.github/actions/detect-changes
228+
uses: tj-actions/changed-files@v45.0.8
212229
id: infra_changes
213230
with:
214231
files: ${{ matrix.files }}

.github/workflows/tests.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,16 @@ jobs:
8585
- '3.12'
8686
- '3.13'
8787
steps:
88-
# SMART CHANGE DETECTION WITH CHECKOUT
88+
# REPOSITORY CHECKOUT
89+
# Complete repository needed for comprehensive test execution
90+
- name: Checkout Repository
91+
uses: actions/checkout@v4
92+
93+
# SMART CHANGE DETECTION
8994
# Analyzes changes to determine if test execution is necessary
9095
# Includes all test-relevant files: source code, config, and tests
9196
- name: Detect Python changes
92-
uses: ./.github/actions/detect-changes
97+
uses: tj-actions/changed-files@v45.0.8
9398
id: python_changes
9499
with:
95100
files: |

0 commit comments

Comments
 (0)