rust-analyzer-mcp 0.1.0

MCP server for rust-analyzer integration
name: Lint, Build and Test

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

jobs:
  fmt:
    runs-on: ubuntu-latest
    env:
      RUSTFLAGS: -D warnings
      RUST_BACKTRACE: full
      RUST_LOG: trace
    steps:
      - uses: actions/checkout@v5
      - uses: dtolnay/rust-toolchain@master
        with:
          # We use some nightly fmt options.
          toolchain: nightly
          components: rustfmt
      - uses: Swatinem/rust-cache@v2
      - name: Check formatting
        run: |
          cargo --locked fmt -- --check

  clippy:
    runs-on: ubuntu-latest
    env:
      RUSTFLAGS: -D warnings
      RUST_BACKTRACE: full
      RUST_LOG: trace
    steps:
      - uses: actions/checkout@v5
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: stable
          components: clippy
      - uses: Swatinem/rust-cache@v2
      - name: Catch common mistakes and unwrap calls
        run: |
          cargo --locked clippy -- -D warnings

  test:
    runs-on: ubuntu-latest
    needs: [fmt, clippy]
    env:
      RUSTFLAGS: -D warnings
      RUST_BACKTRACE: full
      RUST_LOG: trace
    steps:
      - uses: actions/checkout@v5
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: stable
          components: rust-analyzer
      - uses: Swatinem/rust-cache@v2
      - name: Build and Test
        run: |
          cargo test --release --all-features