navy-nvim-rs 0.0.13

A library for writing neovim rpc clients
name: CI

on:
  push:
    branches: [ navy ]
  pull_request:
    branches: [ navy ]

env:
  CARGO_TERM_COLOR: always
  RUST_BACKTRACE: 1
  NVIMRS_LOG_FILE: nvim-rs.log
  NVIMRS_LOG_LEVEL: debug
  NVIMRS_STDERR: nvim-rs.stderr
  RUSTFLAGS: -C opt-level=0

jobs:
  all:
    strategy:
      matrix:
        os: [windows-latest, macos-latest, ubuntu-latest]

    runs-on: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt,clippy
      - uses: Swatinem/rust-cache@v2
      - run: cargo check --all-targets
      - run: cargo fmt --check --all
      - run: cargo clippy --all-targets
      - run: cargo build --example basic
      - name: Download neovim binary on linux
        if: matrix.os == 'ubuntu-latest'
        run: |
          sudo apt install libfuse2
          curl -L https://github.com/neovim/neovim/releases/download/nightly/nvim-linux-x86_64.appimage -o nvim.appimage
          chmod a+x nvim.appimage
          echo "NVIMRS_TEST_BIN=$PWD/nvim.appimage" >> $GITHUB_ENV
      - name: Download neovim binary on macos
        if: matrix.os == 'macos-latest'
        run: |
          curl -L https://github.com/neovim/neovim/releases/download/nightly/nvim-macos-x86_64.tar.gz -o nvim-macos.tar.gz
          tar xfz nvim-macos.tar.gz
          ls
          echo "NVIMRS_TEST_BIN=$PWD/nvim-macos-x86_64/bin/nvim" >> $GITHUB_ENV
      - name: Download neovim binary on windows
        if: matrix.os == 'windows-latest'
        run: |
          curl -L https://github.com/neovim/neovim/releases/download/nightly/nvim-win64.zip -o nvim-win64.zip
          7z x nvim-win64.zip
          $exe = Get-ChildItem -Path nvim-win64 -Filter nvim.exe -Recurse | %{$_.FullName}
          echo "NVIMRS_TEST_BIN=$exe" >> $env:GITHUB_ENV
      - run: cargo test -- --nocapture