Skip to content

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Dec 16, 2025

Summary

Implements path-based conditional job execution to optimize CI pipeline performance.

Closes #11

Changes

  • Path-based change detection: Added changes job using dorny/paths-filter@v3 to detect which files changed:

    • rust-core: Core Rust crate, Cargo.toml, Cargo.lock
    • python: Python bindings (includes core as dependency)
    • node: Node.js bindings (includes core as dependency)
    • ci: CI configuration files
    • docs: Documentation files
  • Conditional job execution: Resource-intensive jobs only run when relevant files change:

    • security, test-rust, coverage-rust, msrv → rust-core changes
    • test-python, coverage-python → python changes
    • test-node, coverage-node → node changes
    • lint → always runs for fast feedback
  • Full CI triggers:

    • All pushes to main branch
    • PRs with full-ci label
  • Enhanced ci-success gate: Properly handles skipped jobs (success or skipped = pass)

Expected Performance Impact

Scenario Before After Time Saved
Docs-only PRs ~15 min, 9 jobs ~2 min, 1 job ~87%
Python-only PRs ~15 min, 9 jobs ~8 min, 4 jobs ~47%
Node-only PRs ~15 min, 9 jobs ~8 min, 4 jobs ~47%
Core Rust PRs Full CI Full CI 0%
Main branch Full CI Full CI 0%

Test Plan

  • Verify changes job correctly detects file changes
  • Verify conditional jobs skip when not needed
  • Verify full-ci label triggers all jobs
  • Verify main branch pushes run full CI
  • Verify ci-success correctly reports with skipped jobs

Implement path-based filtering to run only relevant CI jobs based on changed files, significantly reducing CI time and resource usage for targeted changes.

Changes:
- Add dorny/paths-filter@v3 to detect file changes across rust-core, python, node, ci, and docs paths
- Add conditional execution to test, coverage, security, and msrv jobs
- Implement full-ci trigger via label or main branch push
- Update ci-success gate to properly handle skipped jobs
- Add PR event types (labeled) to support full-ci label

Expected impact:
- Docs-only PRs: ~87% faster (2min vs 15min)
- Python-only PRs: ~47% faster (8min vs 15min)
- Node-only PRs: ~47% faster (8min vs 15min)
- Core/CI changes: No change (full CI required)

The lint job always runs for fast feedback on formatting issues.

Resolves #11
@codecov-commenter
Copy link

codecov-commenter commented Dec 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #14   +/-   ##
=======================================
  Coverage   78.80%   78.80%           
=======================================
  Files          27       27           
  Lines        4303     4303           
=======================================
  Hits         3391     3391           
  Misses        912      912           
Flag Coverage Δ
rust-core 78.80% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Use taiki-e/install-action for cargo-nextest installation instead of
cargo install, reducing installation time from ~60-90s to ~2-5s.
- lint-stable: runs clippy and doc-check with stable toolchain
- lint-nightly: runs rustfmt with nightly toolchain
- Jobs run in parallel for faster feedback
- Updated all dependent jobs and ci-success gate
ci-coverage-rust now runs llvm-cov directly since tools are
pre-installed via taiki-e/install-action in CI workflow.
- Add .cargo/config.toml with lld-link for Windows MSVC targets
- Disable Windows Defender real-time monitoring in test jobs
- Add llvm-tools component for lld-link availability
- Applied to test-rust, test-python, and test-node jobs
@bug-ops bug-ops merged commit a67623f into main Dec 16, 2025
30 checks passed
@bug-ops bug-ops deleted the feat/issue-11-ci-path-filters branch December 16, 2025 01:52
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.

Optimize CI with path-based conditional job execution

3 participants