name: Vader

on:
  push:
    branches:
      - master
  pull_request:

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    strategy:
      matrix:
        vim:
        - 'v8.2.0000'
        - 'v8.1.0000'
        - 'v8.0.0000'
        - 'v7.4'

    steps:
    - name: Checkout code
      uses: actions/checkout@main

    - name: Setup dotnet
      uses: actions/setup-dotnet@main
      with:
        dotnet-version: '3.1.x'

    - name: Setup Vim
      uses: rhysd/action-setup-vim@v1
      with:
        vim_version: ${{ matrix.vim }}

    - name: Install Dependencies
      run: |
        installer/omnisharp-manager.sh -l $HOME/.omnisharp/omnisharp-roslyn
        git clone https://github.com/junegunn/vader.vim.git $GITHUB_WORKSPACE/../vader.vim

    - name: Run Test
      run: |
        cd test
        vim -esNu vimrc -c 'Vader! *'
      if: ${{ always() }}

name: Vader

on:
  push:
    branches:
      - master
  pull_request:

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    strategy:
      matrix:
        cfg:
          - { editor: vim, neovim: false, version: nightly }
          - { editor: vim, neovim: false, version: stable }
          - { editor: neovim, neovim: true, version: stable }

    steps:
    - name: Checkout code
      uses: actions/checkout@main

    - name: Setup dotnet
      uses: actions/setup-dotnet@main
      with:
        dotnet-version: '3.1.x'

    - name: Setup Vim
      uses: rhysd/action-setup-vim@v1
      with:
        neovim: ${{ matrix.cfg.neovim }}
        version: ${{ matrix.cfg.version }}

    - name: Install Dependencies
      run: |
        installer/omnisharp-manager.sh -l $HOME/.omnisharp/omnisharp-roslyn
        git clone https://github.com/junegunn/vader.vim.git $GITHUB_WORKSPACE/../vader.vim

    - name: Run Test
      run: |
        cd test
        vim -esNu vimrc -c 'Vader! *'
      if: matrix.cfg.editor == 'vim'

    - name: Run Test
      run: |
        cd test
        nvim --headless -Nu vimrc -c 'Vader! *'
      env:
        VADER_OUTPUT_FILE: /dev/stderr 
      if: matrix.cfg.editor == 'neovim'

Test neovim stable and vim stable and nightly
Test neovim stable and vim stable and nightly
