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
skill-validate:
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
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 }}