From 5eeff184071cd28bc522355e6c330c9ffe116a22 Mon Sep 17 00:00:00 2001 From: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Date: Fri, 30 May 2025 14:35:38 -0500 Subject: [PATCH] [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 --- .github/test-filters.yml | 14 +++++--------- .github/workflows/tests.yml | 3 ++- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/test-filters.yml b/.github/test-filters.yml index 89f4322adea..fc52e85082c 100644 --- a/.github/test-filters.yml +++ b/.github/test-filters.yml @@ -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*" \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f04a1987eff..f9d26b5568a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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'}}