Skip to content

chore: add CI workflow with paths-filter and gate job#37

Merged
j4rviscmd merged 4 commits intomainfrom
chore/ci-workflow
Apr 9, 2026
Merged

chore: add CI workflow with paths-filter and gate job#37
j4rviscmd merged 4 commits intomainfrom
chore/ci-workflow

Conversation

@j4rviscmd
Copy link
Copy Markdown
Owner

Summary

Add a CI pipeline for pull requests targeting main, with 4 parallel jobs and optimized execution.

Changes

New files

  • .github/workflows/ci.yml — CI workflow with 5 jobs (changes detection + 4 check jobs + gate)
  • .github/actions/setup-node-cache/action.yml — Composite action for shared Node.js setup and caching

CI Jobs

Job Description Timeout
Detect Changes Uses dorny/paths-filter to determine which jobs need to run 5min
Frontend Lint ESLint + Stylelint + Hygiene 30min
Frontend Compile Check TypeScript compile check + Valid layers check 30min
Backend Lint Clippy with -D warnings 20min
Backend Format rustfmt --check 10min
CI Gate Aggregates all results for branch protection compatibility 5min

Optimizations

  • dorny/paths-filter: Skip irrelevant jobs based on changed files
  • Sparse checkout: Rust jobs only checkout src-tauri/
  • Composite Action: Shared Node.js + cache setup (DRY)
  • Concurrency control: Cancel duplicate runs for same PR
  • CI Gate job: Compatible with required status checks (skipped jobs don't block merge)

Branch Protection Updates

  • Added CI Gate as required status check in repository ruleset
  • Enabled dismiss_stale_reviews_on_push for re-approval after new pushes

How to Test

  1. Create a PR that modifies only src-tauri/ files → only backend jobs should run
  2. Create a PR that modifies only src/ files → only frontend jobs should run
  3. Create a PR modifying both → all jobs should run
  4. Verify CI Gate passes when skipped jobs exist

- Add 4-job CI pipeline: frontend-lint, frontend-compile, backend-lint, backend-format
- Add composite action for shared Node.js setup and caching
- Use dorny/paths-filter for selective job execution
- Add sparse checkout for Rust jobs
- Add ci-gate job for branch protection compatibility
- Configure concurrency control to cancel duplicate runs
… issues

- Add --experimental-strip-types flag for computeNodeModulesCacheKey.ts execution
- Set NODE_OPTIONS=--experimental-strip-types for npm ci preinstall scripts
- Replace sparse-checkout with full checkout + out/ stub for backend-lint
  (tauri::generate_context!() requires frontendDist path to exist)
…elease

- Replace deleted computeNodeModulesCacheKey.ts with package-lock.json hash
- Use npm ci --ignore-scripts to avoid preinstall.ts crash (missing .npmrc disturl/target)
- Disable PR trigger (workflow_dispatch only) until source code issues are resolved
- Remove CI Gate from branch protection ruleset required status checks
@j4rviscmd j4rviscmd merged commit dba2134 into main Apr 9, 2026
1 check passed
@j4rviscmd j4rviscmd deleted the chore/ci-workflow branch April 9, 2026 12:42
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