Skip to content

Commit 3a8db23

Browse files
authored
fix(ci): drop paths-filter negation patterns that fire on docs-only PRs (#61)
dorny/paths-filter standalone negation patterns (`'!apps/api/**/*.md'` and the like) don't behave like exclude-from-include rules — they evaluate to true for ANY changed file that doesn't fit the inverse pattern. Net effect: on a docs-only PR with no code touched, the `code` filter still returned `true` because a docs `.mdx` file doesn't match `apps/api/**/*.md`, so the negation "matched". Concrete evidence: PR #58 (only changed `apps/docs/.../deployment.mdx`). Every step in `apps-api-ci.yml`'s `validate` job ran — checkout, filter, Bun, install, db migrations, full test suite, coverage, production bundle. The buggy negation set `Filter code = true`, the internal `if: steps.filter.outputs.code == 'true'` gates all short-circuited to "run", and we hit a unit-test flake on a PR that touched zero application code. Removed the negation lines from all 10 affected workflows. The filter now matches strictly on the positive paths (`apps/api/**`, `apps/ui/**`, etc. + the workflow file itself). Trade-off: a `README.md` change inside `apps/api/` will now trigger api-ci. That's acceptable — those changes are rare, and the previous "fast-skip" optimisation wasn't actually working anyway. Net effect on docs-only PRs: api-ci, ui-validate, smoke, bootstrap-validate, validate-compose, and the security workflows all now correctly skip-with-success in ~30 s instead of running their full pipelines. Files touched (10 workflows, 22 lines deleted): apps-api-ci.yml apps-api-security-{deps,sast,secrets}.yml apps-ui-security-{deps,sast,secrets}.yml apps-ui-validate.yml infra-bootstrap-validate.yml infra-compose-full-stack-smoke.yml infra-compose-validate-compose.yml (3 filter blocks) This PR self-verifies: it's workflow-only, so the `code` filter on every affected workflow should now correctly evaluate to `false` on this PR (no apps/api, apps/ui, infra/* changes), and the heavy jobs should report quick green via skip-with-success. If you see Bun install + full test suite running on this PR, the fix is wrong.
1 parent 958f463 commit 3a8db23

11 files changed

Lines changed: 0 additions & 22 deletions

.github/workflows/apps-api-ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ jobs:
8585
filters: |
8686
code:
8787
- 'apps/api/**'
88-
- '!apps/api/**/*.md'
89-
- '!apps/api/**/*.mdx'
9088
- '.github/workflows/apps-api-ci.yml'
9189
9290
- name: Set up Bun

.github/workflows/apps-api-security-deps.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ jobs:
4242
filters: |
4343
code:
4444
- 'apps/api/**'
45-
- '!apps/api/**/*.md'
46-
- '!apps/api/**/*.mdx'
4745
- '.github/workflows/apps-api-security-deps.yml'
4846
4947
- name: Install osv-scanner CLI

.github/workflows/apps-api-security-sast.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ jobs:
5555
filters: |
5656
code:
5757
- 'apps/api/**'
58-
- '!apps/api/**/*.md'
59-
- '!apps/api/**/*.mdx'
6058
- '.github/workflows/apps-api-security-sast.yml'
6159
6260
- name: Compute baseline

.github/workflows/apps-api-security-secrets.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ jobs:
4646
filters: |
4747
code:
4848
- 'apps/api/**'
49-
- '!apps/api/**/*.md'
50-
- '!apps/api/**/*.mdx'
5149
- '.github/workflows/apps-api-security-secrets.yml'
5250
5351
- name: Install gitleaks CLI

.github/workflows/apps-ui-security-deps.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ jobs:
4242
filters: |
4343
code:
4444
- 'apps/ui/**'
45-
- '!apps/ui/**/*.md'
46-
- '!apps/ui/**/*.mdx'
4745
- '.github/workflows/apps-ui-security-deps.yml'
4846
4947
- name: Install osv-scanner CLI

.github/workflows/apps-ui-security-sast.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ jobs:
5454
filters: |
5555
code:
5656
- 'apps/ui/**'
57-
- '!apps/ui/**/*.md'
58-
- '!apps/ui/**/*.mdx'
5957
- '.github/workflows/apps-ui-security-sast.yml'
6058
6159
- name: Compute baseline

.github/workflows/apps-ui-security-secrets.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ jobs:
4646
filters: |
4747
code:
4848
- 'apps/ui/**'
49-
- '!apps/ui/**/*.md'
50-
- '!apps/ui/**/*.mdx'
5149
- '.github/workflows/apps-ui-security-secrets.yml'
5250
5351
- name: Install gitleaks CLI

.github/workflows/apps-ui-validate.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ jobs:
3434
filters: |
3535
code:
3636
- 'apps/ui/**'
37-
- '!apps/ui/**/*.md'
38-
- '!apps/ui/**/*.mdx'
3937
- '.github/workflows/apps-ui-validate.yml'
4038
4139
- name: Set up Bun

.github/workflows/infra-bootstrap-validate.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
filters: |
3131
code:
3232
- 'infra/bootstrap/**'
33-
- '!infra/bootstrap/**/*.md'
3433
- '.github/workflows/infra-bootstrap-validate.yml'
3534
3635
- name: Install OpenTofu

.github/workflows/infra-compose-full-stack-smoke.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ jobs:
5959
- 'apps/api/**'
6060
- 'apps/ui/**'
6161
- 'infra/compose/**'
62-
- '!**/*.md'
63-
- '!**/*.mdx'
6462
- '.github/workflows/infra-compose-full-stack-smoke.yml'
6563
6664
- name: Seed compose/.env

0 commit comments

Comments
 (0)