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

jobs:
  rust-ci:
    name: Rust Lint & Test
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v5

      - name: Set up Rust
        run: make install-rust

      - name: Cache dependencies
        uses: actions/cache@v5
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

      - name: Run CI
        run: make ci
