lsp-cli 0.1.6

Command-line tool for talking to Language Server Protocol (LSP) servers from the terminal.
name: CI

on:
  push:
  pull_request:

concurrency:
  group: ci-${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  rust:
    name: Format, test, and lint (${{ matrix.rust }})
    runs-on: ubuntu-latest

    strategy:
      fail-fast: false
      matrix:
        rust:
          - stable
          - beta
          - "1.91"

    steps:
      - name: Check out repository
        uses: actions/checkout@v7
        with:
          submodules: recursive

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.rust }}
          components: rustfmt, clippy

      - name: Cache cargo artifacts
        uses: Swatinem/rust-cache@v2

      - name: Check formatting
        if: matrix.rust == 'stable'
        run: make check-format

      - name: Check generated command reference
        if: matrix.rust == 'stable'
        run: make check-readme

      - name: Run tests
        run: make check-tests

      - name: Run clippy
        if: matrix.rust == 'stable'
        run: make check-clippy

  real-server-e2e:
    name: Real-server E2E
    runs-on: ubuntu-latest

    steps:
      - name: Check out repository
        uses: actions/checkout@v7
        with:
          submodules: recursive

      - name: Install stable Rust toolchain
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: stable

      - name: Cache cargo artifacts
        uses: Swatinem/rust-cache@v2

      - name: Install Java
        uses: actions/setup-java@v5
        with:
          distribution: temurin
          java-version: '21'

      - name: Run real-server E2E tests
        run: make test-real-server-e2e