Skip to content

Commit 163cd4a

Browse files
committed
Update path-filter rules for unit tests
1 parent 85ac77b commit 163cd4a

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

.github/workflows/tests.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,23 @@ jobs:
88
name: Detect files changed
99
runs-on: ubuntu-latest
1010
outputs:
11-
skip: '${{ steps.changes.outputs.skip }}'
11+
src-only: '${{ steps.changes.outputs.src-only }}'
1212
steps:
1313
- uses: actions/checkout@v4
1414
- uses: dorny/paths-filter/@v2.11.1
1515
id: changes
1616
with:
1717
filters: |
18-
skip:
19-
- '**/*.md'
20-
- '**/*.asciidoc'
21-
- '**/*.txt'
22-
- 'docs/**'
23-
- '.ci/**'
24-
- '.buildkite/**'
25-
- 'scripts/**'
26-
- 'catalog-info.yaml'
18+
src-only:
19+
- '!(**/*.{md,asciidoc,txt}|*.{md,asciidoc,txt}|{docs,.ci,.buildkite,scripts}/**/*|catalog-info.yaml)'
20+
- '.github/workflows/**'
2721
2822
test:
2923
name: Test
3024
runs-on: ${{ matrix.os }}
3125
needs: paths-filter
32-
# only run if files not in `skip` filter were changed
33-
if: needs.paths-filter.outputs.skip != 'true'
26+
# only run if code relevant to unit tests was changed
27+
if: needs.paths-filter.outputs.src-only == 'true'
3428

3529
strategy:
3630
matrix:

0 commit comments

Comments
 (0)