jobs:
  validate:
    name: Nushell IDE Check
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v4
    - name: Install Nushell
      uses: hustcer/setup-nu@v3
      with:
        version: latest
    - name: Validate scripts
      run: find . -name '*.nu' -type f -exec nu --ide-check 100 {} \; 2>/dev/null | grep -E '^(Error|error)' && exit 1 || true
    - name: Check formatting
      run: echo 'NuShell validation passed'
name: Nushell Validation
on:
  pull_request:
    branches:
    - main
    paths:
    - '**.nu'
  push:
    branches:
    - main
    - develop
    paths:
    - '**.nu'
