ilo 0.11.2

ilo — a programming language for AI agents
Documentation
name: Rust

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

env:
  CARGO_TERM_COLOR: always

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v5
    - name: Check formatting
      run: cargo fmt --all -- --check
    - name: Clippy
      run: cargo clippy --workspace --all-targets -- -D warnings
    - name: Set up Python
      uses: actions/setup-python@v5
      with:
        python-version: '3.12'
    - name: Install skills-ref (agentskills.io reference validator)
      run: pip install git+https://github.com/agentskills/agentskills.git#subdirectory=skills-ref
    - name: Validate Agent Skills spec conformance
      run: skills-ref validate skills/ilo/

  skill-validate:
    # Validate skills/ilo/SKILL.md against the agentskills.io reference
    # validator. This catches regressions in cross-host compatibility
    # (Claude Code, Claude Desktop, Codex, etc.) before the Rust tests run.
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v5
    - name: Install skills-ref
      run: npm install -g skills-ref
    - name: Validate skill
      run: skills-ref validate skills/ilo/
    - name: Print resolved properties (for debug)
      run: skills-ref read-properties skills/ilo/

  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v5
    - name: Install cargo-nextest
      uses: taiki-e/install-action@v2
      with:
        tool: nextest
    - name: Build
      run: cargo build --verbose
    - name: Verify ai.txt is in sync with SPEC.md
      # build.rs regenerates ai.txt from SPEC.md. If a contributor edited SPEC.md without
      # committing the regenerated ai.txt, the diff is non-empty and CI fails.
      run: git diff --exit-code ai.txt
    - name: Run tests (JUnit XML output)
      run: cargo nextest run --profile ci
    - name: Upload test results to Codecov
      if: ${{ !cancelled() }}
      uses: codecov/codecov-action@v6
      with:
        files: target/nextest/ci/junit.xml
        report_type: test_results
        token: ${{ secrets.CODECOV_TOKEN }}

  coverage:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v5
    - name: Install cargo-llvm-cov
      uses: taiki-e/install-action@v2
      with:
        tool: cargo-llvm-cov
    - name: Build libilo.a (needed by AOT tests)
      run: cargo build
    - name: Generate coverage
      run: cargo llvm-cov --workspace --lcov --output-path lcov.info
    - name: Upload to Codecov
      uses: codecov/codecov-action@v6
      with:
        files: lcov.info
        fail_ci_if_error: false
      env:
        CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}