Following the established pattern from twmq crate, I've created dedicated GitHub Actions workflows for the engine-executors crate that exactly match the repository conventions.
ci-twmq.yaml- Tests for twmq cratecoverage-twmq.yaml- Coverage for twmq crate
ci-executors.yaml- Tests for engine-executors cratecoverage-executors.yaml- Coverage for engine-executors crate
# Pattern: {crate-name} Tests / {crate-name} Coverage
name: twmq Tests → name: engine-executors Tests
name: twmq Coverage → name: engine-executors Coverage# Before (Non-compliant): Multiple paths
paths:
- "executors/**"
- "aa-types/**" # ❌ Dependencies shouldn't trigger
- "core/**" # ❌ Dependencies shouldn't trigger
- "twmq/**" # ❌ Other crates shouldn't trigger
# After (Compliant): Single crate path only
paths:
- "executors/**" # ✅ Only this crate triggers its workflow# CI Cache Key (exactly matching twmq)
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# Coverage Cache Key (exactly matching twmq)
key: ${{ runner.os }}-cargo-tarpaulin-${{ hashFiles('**/Cargo.lock') }}# Pattern: Always use -p {crate-name}
Build: cargo build -p twmq --verbose → cargo build -p engine-executors --verbose
Test: cargo nextest run -p twmq --profile ci → cargo nextest run -p engine-executors --profile ci
Coverage: cargo tarpaulin -p twmq ... → cargo tarpaulin -p engine-executors ...# Test Report Name (exactly matching twmq)
name: Integration Tests # ✅ Same for all crates
# Coverage Artifact Name (exactly matching twmq)
name: code-coverage-report # ✅ Same for all crates.github/workflows/
├── ci-twmq.yaml # ✅ Tests for twmq crate
├── coverage-twmq.yaml # ✅ Coverage for twmq crate
├── ci-executors.yaml # ✅ Tests for engine-executors crate
├── coverage-executors.yaml # ✅ Coverage for engine-executors crate
└── (other workflows...)
Triggers:
- Push to main with changes in executors/**
- PR to main with changes in executors/**
- Manual dispatch
Steps:
1. ✅ Setup Redis service (redis:7-alpine)
2. ✅ Checkout code with SSH agent
3. ✅ Install cargo-nextest
4. ✅ Cache cargo artifacts (shared key)
5. ✅ Build engine-executors package
6. ✅ Run tests with nextest
7. ✅ Generate JUnit XML report
8. ✅ Upload test results for PR visibilityTriggers:
- Push to main with changes in executors/**
- PR to main with changes in executors/**
- Manual dispatch
Steps:
1. ✅ Setup Redis service (redis:7-alpine)
2. ✅ Checkout code with SSH agent
3. ✅ Install cargo-tarpaulin
4. ✅ Cache cargo artifacts (shared key)
5. ✅ Run coverage analysis on engine-executors
6. ✅ Generate HTML & XML coverage reports
7. ✅ Upload coverage artifacts
8. ✅ Add coverage summary to job summary- ✅ Each crate has its own dedicated workflows
- ✅ Only triggers on changes to that specific crate
- ✅ No cross-crate triggering to avoid unnecessary runs
- ✅ Identical workflow structure across all crates
- ✅ Same service configurations (Redis)
- ✅ Same caching strategies
- ✅ Same reporting mechanisms
- ✅ Shared infrastructure (Redis service, SSH setup)
- ✅ Common artifact names for easy aggregation
- ✅ Standard tool usage (nextest, tarpaulin)
- ✅ Only runs when relevant code changes
- ✅ Proper caching to speed up builds
- ✅ Parallel test execution with nextest
| Aspect | twmq Pattern | engine-executors Implementation | Status |
|---|---|---|---|
| Workflow Names | twmq Tests, twmq Coverage |
engine-executors Tests, engine-executors Coverage |
✅ |
| Path Triggers | "twmq/**" only |
"executors/**" only |
✅ |
| Cache Keys | Shared, no crate suffix | Shared, no crate suffix | ✅ |
| Build Command | cargo build -p twmq |
cargo build -p engine-executors |
✅ |
| Test Command | cargo nextest run -p twmq |
cargo nextest run -p engine-executors |
✅ |
| Coverage Command | cargo tarpaulin -p twmq |
cargo tarpaulin -p engine-executors |
✅ |
| Test Report Name | "Integration Tests" | "Integration Tests" | ✅ |
| Artifact Name | "code-coverage-report" | "code-coverage-report" | ✅ |
| Redis Service | redis:7-alpine | redis:7-alpine | ✅ |
| SSH Setup | webfactory/ssh-agent | webfactory/ssh-agent | ✅ |
- ✅ Predictable: Same workflow structure for every crate
- ✅ Efficient: Only runs tests for changed crates
- ✅ Fast Feedback: Parallel execution with proper caching
- ✅ Clear Reports: Consistent test and coverage reporting
- ✅ Scalable: Easy to add workflows for new crates
- ✅ Maintainable: Identical structure makes updates simple
- ✅ Resource Efficient: No unnecessary workflow runs
- ✅ Reliable: Proven pattern from existing twmq workflows
- ✅ Comprehensive: Every crate gets full test & coverage analysis
- ✅ Isolated: Issues in one crate don't affect others
- ✅ Traceable: Clear mapping between crate changes and test results
- ✅ Consistent: Same quality standards across all crates
Successfully implemented GitHub Actions workflows for the engine-executors crate that exactly match the established repository pattern:
- ✅ Pattern Compliance: 100% match with twmq workflow structure
- ✅ Trigger Isolation: Only runs on executors/** changes
- ✅ Tool Consistency: Uses same CI tools (nextest, tarpaulin)
- ✅ Cache Efficiency: Shares cache keys for optimal performance
- ✅ Report Standards: Uses standard artifact and report names
- ✅ Service Integration: Proper Redis setup for realistic testing
The workflows are now ready to automatically execute on every PR that touches the executors crate, providing immediate feedback on test results and coverage analysis while following the exact patterns established in the repository.