rez-lsp-server 0.1.3

A Language Server Protocol implementation for Rez package manager with intelligent code completion, validation, and navigation
Documentation
name: CI

on:
  push:
    branches: [ main, develop, 'feature/*' ]
  pull_request:
    branches: [ main, develop ]

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    name: Test
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
        rust: [stable]

    steps:
    - uses: actions/checkout@v4
    
    - name: Install Rust
      uses: dtolnay/rust-toolchain@stable
      with:
        toolchain: ${{ matrix.rust }}
        components: rustfmt, clippy
    
    - name: Cache cargo registry
      uses: actions/cache@v4
      with:
        path: ~/.cargo/registry
        key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
    
    - name: Cache cargo index
      uses: actions/cache@v4
      with:
        path: ~/.cargo/git
        key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
    
    - name: Cache cargo build
      uses: actions/cache@v4
      with:
        path: target
        key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

    - name: Check formatting
      run: cargo fmt --all -- --check

    - name: Run clippy
      run: cargo clippy --all-targets --all-features -- -D warnings

    - name: Run tests
      run: cargo test --lib --verbose

    - name: Run doc tests
      run: cargo test --doc --verbose
      continue-on-error: true  # Doc tests may fail on some platforms

    - name: Build
      run: cargo build --release --verbose

    - name: Test LSP functionality
      run: |
        # Set up test environment
        export REZ_PACKAGES_PATH="${{ github.workspace }}/test_packages"

        # Test help command
        ./target/release/rez-lsp-server --help

        # Test version command
        ./target/release/rez-lsp-server --version

        echo "LSP server basic functionality tests passed"
      if: runner.os != 'Windows'

  security_audit:
    name: Security Audit
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: rustsec/audit-check@v2.0.0
      with:
        token: ${{ secrets.GITHUB_TOKEN }}

  vscode_extension:
    name: VSCode Extension
    runs-on: ubuntu-latest
    needs: test
    steps:
    - name: Checkout code
      uses: actions/checkout@v4

    - name: Setup Node.js
      uses: actions/setup-node@v4
      with:
        node-version: '22'

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

    - name: Cache cargo build
      uses: actions/cache@v4
      with:
        path: target
        key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

    - name: Build LSP server
      run: cargo build --release

    - name: Install extension dependencies
      working-directory: vscode-extension
      run: npm install

    - name: Lint extension
      working-directory: vscode-extension
      run: npm run lint

    - name: Compile extension
      working-directory: vscode-extension
      run: npm run compile

    - name: Run extension tests
      working-directory: vscode-extension
      run: npm test
      continue-on-error: true  # Tests may not be fully implemented yet

    - name: Package extension
      working-directory: vscode-extension
      run: |
        npm install -g @vscode/vsce
        vsce package --out rez-lsp-extension-${{ github.sha }}.vsix

    - name: Upload extension artifact
      uses: actions/upload-artifact@v4
      with:
        name: vscode-extension
        path: vscode-extension/rez-lsp-extension-${{ github.sha }}.vsix
        retention-days: 30