Skip to content

Commit 1cb0326

Browse files
committed
Only runs table tests if there is changes on dash-table or dash-renderer
1 parent a9832dd commit 1cb0326

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/workflows/testing.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@ on:
66

77
jobs:
88

9+
changes_filter:
10+
name: Detect Relevant Path Changes
11+
runs-on: ubuntu-latest
12+
outputs:
13+
# This output will be 'true' if files in the 'table_related_paths' list changed, 'false' otherwise.
14+
table_paths_changed: ${{ steps.filter.outputs.table_related_paths }}
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Detect changed files for table tests
20+
id: filter # Give an ID to this step to reference its outputs
21+
uses: dorny/paths-filter@v3
22+
with:
23+
filters: |
24+
table_related_paths:
25+
- 'components/dash-table/**'
26+
- 'dash/dash-renderer/**'
27+
928
build:
1029
name: Build Dash Package
1130
runs-on: ubuntu-latest
@@ -278,7 +297,12 @@ jobs:
278297
279298
table-server:
280299
name: Table Server Tests (Group ${{ matrix.test-group }})
281-
needs: build
300+
needs: [build, changes_filter]
301+
# Conditional execution:
302+
# OR if the 'changes_filter' job detected changes in 'table_related_paths'.
303+
if: |
304+
(github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev')) ||
305+
needs.changes_filter.outputs.table_paths_changed == 'true'
282306
runs-on: ubuntu-latest
283307
strategy:
284308
fail-fast: false

0 commit comments

Comments
 (0)