Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 6 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -390,47 +390,31 @@ jobs:
working-directory: bindings/flutter/example
run: flutter test

# ── Contract tests: shared JSON fixtures (catches cross-language type drift) ──
# Generated files must match their generators.
contract-tests:
name: Contract tests
name: Generator drift checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Providers doc generator drift (docs/api/providers.md must match generator output)
run: python3 scripts/gen_providers_doc.py --check
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Run Rust contract tests
run: cargo test --test contract_test -p aimux-core
- name: ts-rs export drift (checked-in types must match generator output)
run: python3 scripts/gen_ts_types.py --check
- name: Build Node binding
working-directory: bindings/node
run: |
npm ci
npx napi build --platform
- name: Run Node contract tests
working-directory: contract-tests
run: |
node --experimental-strip-types run-node.ts

# ── Swift contract tests: the eighth binding joins the shared fixtures ─────
# Needs macOS (XCTest) and the FFI cdylib, which the Swift package links via
# the CAimuxFFI system module. The Dart side needs no job here: flutter-binding
# already runs `flutter test`, which picks up bindings/flutter/test/contract_test.dart.
# Swift tests need macOS (XCTest) and the FFI cdylib, which the Swift package
# links via the CAimuxFFI system module.
swift-contract-tests:
name: Swift contract tests
name: Swift tests
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build the FFI library the Swift package links against
run: cargo build -p aimux-ffi --release
- name: Run Swift contract tests
- name: Run Swift tests
working-directory: bindings/swift
env:
DYLD_LIBRARY_PATH: ${{ github.workspace }}/target/release
Expand Down
7 changes: 1 addition & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ aimux/
├── aimux-provider-utils/ # HTTP utilities: retry, backoff, error parsing, API-key loading
├── aimux-ffi/ # C ABI (opaque handle + JSON + push callback) for non-native bindings
├── bindings/ # Node, Python, Swift, Kotlin, Flutter, Go, C — share one Rust core
├── contract-tests/ # Shared JSON fixtures exercised across languages
├── rfc/ # Design docs (RFCs)
├── docs/ # Public product docs (see docs/README.md)
└── scripts/ # Code-generation and maintenance scripts
Expand Down Expand Up @@ -50,9 +49,6 @@ cargo test --workspace

# A single crate
cargo test -p aimux-providers --tests

# Contract tests (cross-language shared fixtures)
cargo test --test contract_test -p aimux-core
```

If you add or change a provider's request/response shapes, record a new
Expand Down Expand Up @@ -108,8 +104,7 @@ Keep the subject line imperative and ≤ 72 characters.
2. Make your change with focused commits.
3. Ensure `cargo fmt`, `cargo clippy -D warnings`, and `cargo test --workspace`
all pass locally. CI runs the same.
4. If you add a provider or binding, include cassette tests or contract
fixtures as appropriate.
4. If you add a provider or binding, include cassette tests.
5. Update the relevant doc (README, `docs/`, or `rfc/`) if your change affects
the public surface.
6. Open a PR against `master` and fill in the template.
Expand Down
Loading