oxios 0.3.0

Oxios Agent OS — Agent Operating System powered by oxi-sdk
name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  check:
    strategy:
      matrix:
        include:
          - os: macos-latest
            target: aarch64-apple-darwin
          - os: ubuntu-latest
            target: x86_64-unknown-linux-gnu

    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
        with:
          path: oxios
      - uses: oven-sh/setup-bun@v2

      - name: Build web assets
        working-directory: oxios/channels/oxios-web/web
        run: bun install && bun run build

      - uses: actions/checkout@v4
        with:
          repository: a7garden/oxi
          path: oxi
          ref: v0.4.4

      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy

      - uses: Swatinem/rust-cache@v2
        with:
          workspaces: |
            oxios -> target
            oxi -> target

      - name: Check formatting
        working-directory: oxios
        run: cargo fmt --all -- --check

      - name: Clippy
        working-directory: oxios
        run: cargo clippy -p oxios -p oxios-kernel -p oxios-ouroboros -p oxios-gateway -p oxios-web -- -D warnings

      - name: Test
        working-directory: oxios
        run: cargo test --workspace

      - name: Test coverage (Linux only)
        if: matrix.os == 'ubuntu-latest'
        working-directory: oxios
        run: |
          cargo install cargo-llvm-cov
          cargo llvm-cov --workspace --lcov --output-path lcov.info || true

      - name: Upload coverage
        if: matrix.os == 'ubuntu-latest'
        uses: codecov/codecov-action@v4
        with:
          files: oxios/lcov.info
          fail_ci_if_error: false

      - name: Security audit
        working-directory: oxios
        run: |
          cargo install cargo-audit
          mkdir -p ~/.cargo
          cp audit.toml ~/.cargo/audit.toml
          cargo audit --deny warnings

  frontend:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: oven-sh/setup-bun@v2
      - name: Install dependencies
        working-directory: channels/oxios-web/web
        run: bun install
      - name: Typecheck
        working-directory: channels/oxios-web/web
        run: bun run typecheck
      - name: Lint
        working-directory: channels/oxios-web/web
        run: bun run lint
      - name: Build
        working-directory: channels/oxios-web/web
        run: bun run build
      - name: Test
        working-directory: channels/oxios-web/web
        run: bunx vitest run