Skip to content

feat: add full test suite, library target, and CI pipeline improvements - #6

Merged
KodeSage merged 2 commits into
mainfrom
dev
Mar 27, 2026
Merged

feat: add full test suite, library target, and CI pipeline improvements#6
KodeSage merged 2 commits into
mainfrom
dev

Conversation

@KodeSage

Copy link
Copy Markdown
Owner

feat: add full test suite, library target, and CI pipeline improvements

Summary

  • Added 110 integration tests across 8 test files covering every implemented module
  • Introduced src/lib.rs to expose the crate as a library so tests/ can import public APIs
  • Updated Cargo.toml with the [lib] target and [dev-dependencies]
  • Expanded .github/workflows/ci.yml with per-suite test steps, dev branch trigger, and additional integration smoke checks
  • Added updates.md with a versioned feature roadmap for future development
  • All tests pass; cargo fmt and cargo clippy -D warnings are both clean
  • Validated the full CI workflow by running it through rustyochestrator itself — all 19 tasks passed, with smart cache hits on repeated runs

What changed

src/lib.rs (new)

Exposes all 10 source modules (cache, cli, config, errors, executor, github, pipeline, reporter, scheduler, tui) as pub mod declarations. This makes the crate a dual binary+library target so integration tests in tests/ can import from it with use rustyochestrator::*.

tests/ (new — 8 files, 110 tests, ~1600 lines)

File Tests Coverage
pipeline_tests.rs 28 YAML parsing, validation, cycle detection, levels(), SHA-256 hashing, TaskState
github_tests.rs 18 Workflow parsing, needs (string + array), sequential steps, env precedence (workflow → job → step), secret ref preservation, ${{ }} expression filtering
cache_tests.rs 13 Hit/miss logic, record overwrites, failed-task not cached, JSON round-trip
executor_tests.rs 11 Success/failure exit codes, env var injection, multiline commands, quiet mode
scheduler_tests.rs 12 Empty pipeline, sequential/parallel/diamond DAG execution, failure propagation to dependents, missing-secret pre-flight error, env override
reporter_tests.rs 12 All Event variants, JSON type tag (snake_case), ISO 8601 timestamp format, field completeness
errors_tests.rs 10 All RustyError variants, From conversions (io::Error, serde_yaml::Error, serde_json::Error), Result type alias
config_tests.rs 6 ConnectConfig JSON round-trip, clone, Debug format, deserialization from raw JSON

Cargo.toml

[lib]
name = "rustyochestrator"
path = "src/lib.rs"

[dev-dependencies]
tokio     = { version = "1", features = ["full"] }
serde_json = "1"
serde_yaml = "0.9"

.github/workflows/ci.yml

  • Added dev to the push trigger branches so CI runs on this branch
  • Expanded the test job to run each test suite as a named step (cargo test --test <suite>) for clear per-suite pass/fail visibility in the GitHub Actions UI
  • Added four new integration smoke steps: validate, list, graph, and init + validate
  • Fixed the integration job cache-hit assertion comment (was "expected 4 cache hits", now reflects the correct 7)

updates.md (new)

Versioned feature roadmap (v0.2–v0.7) covering: task timeouts, configurable retries, output capture, conditional execution, GitHub Actions matrix/if:/context support, structured run reports, pipeline resumption, webhook triggers, remote cache backend, Windows support, and a plugin/hook system.

How it was tested

# All unit + integration tests green
cargo test --all
# 110 passed, 0 failed

# Format and lint clean
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings

# Full CI pipeline run through rustyochestrator itself
cargo run -- run .github/workflows/ci.yml
# All 19 tasks passed (exit 0)
# Second run: all 19 tasks were smart cache hits — completed in <1s

The pipeline run also caught two real issues in the test files that were fixed before merging:

  1. cargo fmt flagged long method chains that needed reformatting
  2. clippy -D warnings flagged .get(...).is_none() (use .contains_key(...)) and unwrap() on a literal Ok value

Checklist

  • All 110 tests pass
  • cargo fmt --check passes
  • cargo clippy -D warnings passes
  • cargo build --release passes
  • CI workflow validated end-to-end via rustyochestrator run .github/workflows/ci.yml
  • No breaking changes to existing public API or CLI behaviour
  • No new unwrap() calls in production code

@gitguardian

gitguardian Bot commented Mar 27, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
29254658 Triggered Generic High Entropy Secret 22f8a0b tests/config_tests.rs View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@KodeSage
KodeSage merged commit 22740da into main Mar 27, 2026
10 of 11 checks passed
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