name: E2E Ensemble Integration Tests on: push: branches: [ main, develop ] pull_request: branches: [ main ] workflow_dispatch: jobs: e2e-ensemble-tests: name: Run E2E Ensemble Tests runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 - name: Install Rust toolchain uses: actions-rs/toolchain@v1 with: toolchain: stable profile: minimal override: true components: rustfmt, clippy - name: Cache cargo registry uses: actions/cache@v3 with: path: ~/.cargo/registry key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index uses: actions/cache@v3 with: path: ~/.cargo/git key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo build uses: actions/cache@v3 with: path: target key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} - name: Run E2E ensemble integration tests run: | cargo test -p ml --test e2e_ensemble_integration -- --test-threads=1 --nocapture env: RUST_BACKTRACE: 1 RUST_LOG: info - name: Generate test coverage (optional) run: | cargo install cargo-llvm-cov || true cargo llvm-cov test -p ml --test e2e_ensemble_integration --html --output-dir coverage_report || true continue-on-error: true - name: Upload coverage report uses: actions/upload-artifact@v3 if: always() with: name: e2e-coverage-report path: coverage_report/ retention-days: 30 - name: Test summary if: always() run: | echo "## E2E Ensemble Integration Test Results" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "✅ All 13 test scenarios executed" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "### Test Scenarios" >> $GITHUB_STEP_SUMMARY echo "- Data Pipeline (2 tests)" >> $GITHUB_STEP_SUMMARY echo "- Model Prediction (2 tests)" >> $GITHUB_STEP_SUMMARY echo "- Hot-Swap Operations (5 tests)" >> $GITHUB_STEP_SUMMARY echo "- Paper Trading (1 test)" >> $GITHUB_STEP_SUMMARY echo "- Performance Monitoring (2 tests)" >> $GITHUB_STEP_SUMMARY echo "- Comprehensive E2E (1 test)" >> $GITHUB_STEP_SUMMARY