Essential workflow fixes: - ci.yml: add SQLX_OFFLINE=true, replace fictitious cargo subcommands (test-unit, ci-lint, audit-deps, etc.) with real cargo commands, remove broken 9-way test matrix, remove instrument-coverage RUSTFLAGS - test.yml: add SQLX_OFFLINE=true to build-check job, fix conflicting clippy flags (-D and -W on clippy::all), update JWT secret to 32+ chars - compilation-guard.yml: add SQLX_OFFLINE=true, remove references to non-existent paths (services/trading-engine, crates/common/types), remove dangerous auto-commit-to-main, remove MIRI on missing packages Deleted duplicates (justification): - comprehensive_testing.yml: duplicate of comprehensive-testing.yml (same purpose, underscore vs hyphen naming) - production-deploy.yml: duplicate of production-deployment.yml (both named "Production Deployment Pipeline", this one has stale paths) - coverage-fixed.yml: duplicate of coverage.yml (uses deprecated actions-rs/toolchain@v1 and actions/cache@v3) - performance.yml: duplicate of benchmark_regression.yml (both "Performance Regression Detection", this one less mature) - quality-baseline.json: not a workflow, stale fake data (999 warnings) - quality-metrics.json: not a workflow, stale fake data Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
124 lines
2.9 KiB
YAML
124 lines
2.9 KiB
YAML
name: Foxhunt CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, develop ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUST_BACKTRACE: 1
|
|
CARGO_INCREMENTAL: 0
|
|
SQLX_OFFLINE: "true"
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
check:
|
|
name: Check & Lint
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy, rustfmt
|
|
|
|
- name: Setup Rust cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
cache-on-failure: true
|
|
|
|
- name: Install system dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y cmake build-essential pkg-config libssl-dev protobuf-compiler
|
|
|
|
- name: Check compilation
|
|
run: cargo check --workspace --all-targets
|
|
|
|
- name: Check formatting
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: Clippy
|
|
run: cargo clippy --workspace --all-targets
|
|
|
|
test:
|
|
name: Test Suite
|
|
runs-on: ubuntu-latest
|
|
needs: check
|
|
timeout-minutes: 45
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Setup Rust cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
cache-on-failure: true
|
|
|
|
- name: Install system dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y cmake build-essential pkg-config libssl-dev protobuf-compiler
|
|
|
|
- name: Run unit tests
|
|
run: cargo test --workspace --lib
|
|
|
|
- name: Run integration tests
|
|
run: cargo test --workspace --tests -- --test-threads=1
|
|
timeout-minutes: 30
|
|
|
|
- name: Run doc tests
|
|
run: cargo test --workspace --doc
|
|
|
|
quality:
|
|
name: Security Audit
|
|
runs-on: ubuntu-latest
|
|
needs: check
|
|
timeout-minutes: 15
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Setup Rust cache
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Install cargo-audit
|
|
run: cargo install --locked cargo-audit
|
|
|
|
- name: Security audit
|
|
run: cargo audit
|
|
|
|
ci-success:
|
|
name: CI Success
|
|
runs-on: ubuntu-latest
|
|
needs: [check, test, quality]
|
|
if: always()
|
|
steps:
|
|
- name: Check all jobs status
|
|
run: |
|
|
if [[ "${{ needs.check.result }}" == "success" &&
|
|
"${{ needs.test.result }}" == "success" &&
|
|
"${{ needs.quality.result }}" == "success" ]]; then
|
|
echo "All CI checks passed"
|
|
else
|
|
echo "CI checks failed"
|
|
echo "check: ${{ needs.check.result }}"
|
|
echo "test: ${{ needs.test.result }}"
|
|
echo "quality: ${{ needs.quality.result }}"
|
|
exit 1
|
|
fi
|