Skip to content

ci: make PR checks actually run on shared-package changes - #184

Merged
acamarata merged 2 commits into
mainfrom
ci/pr-checks-cover-root-dirs
Sep 14, 2026
Merged

acamarata merged 2 commits into
mainfrom
ci/pr-checks-cover-root-dirs

Conversation

@acamarata

@acamarata acamarata commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

What was wrong

Every job in pr-checks.yml sits behind a dorny/paths-filter, and none of the filters covered the repo's root packages/ directory.

Measured, not inferred — PR #181 changes exactly two files, packages/ui/tsconfig.json and packages/state/tsconfig.json:

SKIPPED  Lint & Format          SKIPPED  Type Check
SKIPPED  Unit Tests             SKIPPED  Build Check
SKIPPED  Desktop Build Check    SKIPPED  Mobile Build Check
... 12 SKIPPED in total

Nothing compiled the code that PR changes. ci.yml, the push gate for main, carried the same hole in its own packages: filter.

Dead filters

The mobile: and desktop: filters matched four paths that are absent from this repo:

Filter path On main?
frontend/platforms/capacitor/** missing
frontend/platforms/react-native/** missing
frontend/platforms/electron/** missing
frontend/platforms/tauri/** missing

The real directories are frontend/platforms/mobile and desktop/. So Mobile Build Check and Desktop Build Check could never trigger — and had they triggered they would have failed, because each cds into one of those missing directories.

Changes

  • packages: also matches packages/**, pnpm-workspace.yaml, pnpm-lock.yaml (in both pr-checks.yml and ci.yml)
  • web: matched frontend/apps/web/** (does not exist) → web/**
  • Deleted the mobile:/desktop: filters, their job outputs, and the two dead jobs

No gate is weakened. Two jobs that reported nothing are removed, and four jobs that never ran on shared-package changes now do.

Correction to an earlier version of this description

I first wrote that both removed jobs "duplicate a dedicated workflow that already targets the real path" and so removing them "drops no coverage that existed". The second half is right; the first half was only half right, and I checked it properly afterwards.

Desktop — claim holds. desktop-linux.yml, desktop-macos.yml and desktop-windows.yml have real pull_request triggers and build desktop/. Desktop is genuinely covered at PR time (and #181 widens those triggers to packages/**).

Mobile — claim was wrong. build-capacitor.yml is workflow_dispatch + workflow_call only, and nothing in the repo calls it. The same is true of build-electron.yml, build-react-native.yml, build-tauri.yml and desktop-build.yml — five reusable workflows that no workflow invokes. So it is not the substitute I said it was.

The real automatic mobile coverage is the android-build job ("Android · debug APK (Capacitor)") in ci.yml, which is ungated and runs on every push that triggers that workflow. But ci.yml is push-only, so:

nchat has no PR-time mobile build gate. Android is built on pushes to main, after merge.

Deleting Mobile Build Check does not cause that — the job could never run, so the gap already existed and was hidden by a job name that looked like coverage. I am flagging it rather than fixing it here, because giving mobile a real PR gate is a separate change with its own runtime cost.

Left open on purpose

frontend-vite/ matches no filter. I did not add one: every job in this workflow runs with working-directory: frontend, so a filter for frontend-vite/ would build the wrong app and report a green that means nothing. It needs its own job.

Every job in pr-checks.yml is gated behind a dorny/paths-filter, and none of
the filters covered the repo's root packages/ directory. A PR touching only
packages/ therefore skipped Lint, Type Check, Unit Tests and Build Check.
Measured on PR #181, which changes two tsconfigs under packages/: 12 of its
checks reported SKIPPED and nothing compiled the code it changed.

- packages: also match packages/**, pnpm-workspace.yaml, pnpm-lock.yaml
- web: matched frontend/apps/web/**, which does not exist; the web surface
  is the root web/ directory

The mobile: and desktop: filters matched four paths that are absent from the
repo -- frontend/platforms/{capacitor,react-native,electron,tauri}. The real
directories are frontend/platforms/mobile and desktop/. Those two filters could
never match, so Mobile Build Check and Desktop Build Check have never produced
a verdict; had they matched, both would have failed, because each cds into one
of the missing directories.

Both jobs duplicate a dedicated workflow that already targets the real path:
build-capacitor.yml builds frontend/platforms/mobile, and desktop-linux.yml,
desktop-macos.yml and desktop-windows.yml build desktop/. Removing the two dead
jobs drops no coverage that existed.

Still uncovered and deliberately not papered over here: frontend-vite/ matches
no filter, but every job in this workflow runs with working-directory: frontend,
so adding a filter for it would run the wrong app's build and report a green
that means nothing. It needs its own job.
ci.yml runs on push to main and gates its jobs with the same paths-filter shape
as pr-checks.yml, including the same 'packages:' entry that only matched
frontend/. A push touching only the shared packages/ directory skipped lint,
type-check, test and build on main as well as on PRs.

frontend/pnpm-workspace.yaml does not exist; the workspace manifest is at the
repo root.
@github-actions

Copy link
Copy Markdown

Security Scan Results: PASSED

Scanner Critical High
SAST 0 0
Dependencies 0 0

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

PR Checks Summary

Check Status
Lint & Format ⏭️ skipped
Type Check ⏭️ skipped
Unit Tests ⏭️ skipped
Build ⏭️ skipped

All checks passed! Ready for review.

@github-actions

Copy link
Copy Markdown

Security Scan Results: PASSED

Scanner Critical High
SAST 0 0
Dependencies 0 0

@acamarata
acamarata merged commit 10dcdfc into main Sep 14, 2026
37 checks passed
@acamarata
acamarata deleted the ci/pr-checks-cover-root-dirs branch September 14, 2026 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant