[GitHub] Fix gh action path filter (#5904)

* Fix test workflow syntax to use negation properly

* Add missing id and comparison check in tests.yml

* Fix missing curly brace
This commit is contained in:
Sirz Benjie 2025-05-30 14:35:38 -05:00 committed by GitHub
parent d5f7665b15
commit 5eeff18407
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 10 deletions

View File

@ -1,7 +1,8 @@
all:
- "src/**"
- "test/**"
- "public/**"
# Negations syntax from https://github.com/dorny/paths-filter/issues/184#issuecomment-2786521554
- "src/**/!(*.{md,py,sh,gitkeep,gitignore})"
- "test/**/!(*.{md,py,sh,gitkeep,gitignore})"
- "public/**/!(*.{md,py,sh,gitkeep,gitignore})"
# Workflows that can impact tests
- ".github/workflows/test*.yml"
- ".github/test-filters.yml"
@ -11,9 +12,4 @@ all:
- "vite*" # vite.config.ts, vite.vitest.config.ts, vitest.workspace.ts
- "tsconfig*.json" # tsconfig.json tweaking can impact compilation
- "global.d.ts"
- ".env*"
# Blanket negations for files that cannot impact tests
- "!**/*.py" # No .py files
- "!**/*.sh" # No .sh files
- "!**/*.md" # No .md files
- "!**/.git*" # .gitkeep and family
- ".env*"

View File

@ -25,6 +25,7 @@ jobs:
- name: checkout
uses: actions/checkout@v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
id: filter
with:
filters: .github/test-filters.yml
@ -39,4 +40,4 @@ jobs:
project: main
shard: ${{ matrix.shard }}
totalShards: 10
skip: ${{ needs.check-path-change-filter.outputs.all == 'false'}}
skip: ${{ needs.check-path-change-filter.outputs.all != 'true'}}