summaryrefslogtreecommitdiff
path: root/.github/workflows/install.yaml
blob: 5f72bcac6d7f4f799016efa69374088eb072779e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: install

on:
  pull_request:
    branches:
      - "master"
      - "rolling"
    paths:
      - '.github/workflows/**'
      - 'lua/**'
      - 'snapshots/**'
      - 'tests/**'
      - 'utils/**'

jobs:
  unixish:
    name: ${{ matrix.os }} ${{ matrix.runner }} (${{ matrix.neovim }})
    strategy:
      fail-fast: false
      matrix:
        include:
          - runner: ubuntu-latest
            os: linux
            neovim: v0.8.0
          - runner: macos-latest
            os: osx
            neovim: v0.8.0
          - runner: ubuntu-22.04
            os: linux
            neovim: nightly
          - runner: macos-12
            os: osx
            neovim: nightly
    runs-on: ${{ matrix.runner }}
    steps:
      - uses: actions/checkout@v3

      - name: Install neovim binary from release
        env:
          RELEASE_VER: ${{ matrix.neovim }}
        run: |
          echo "$HOME/.local/bin" >> "$GITHUB_PATH"
          bash ./utils/installer/install-neovim-from-release

      - name: Install LunarVim
        timeout-minutes: 4
        env:
          LV_BRANCH: ${{ github.head_ref || github.ref_name }}
          LV_REMOTE: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
          LUNARVIM_LOG_LEVEL: "debug"
        run: |
          export PATH="$HOME/.local/bin:$PATH"

          installer_url="https://raw.githubusercontent.com/${LV_REMOTE}/${LV_BRANCH}/utils/installer/install.sh"
          curl -LSsO "$installer_url"
          bash ./install.sh --no-install-dependencies

      - name: Run unit-tests
        # NOTE: make sure to adjust the timeout if you start adding a lot of tests
        timeout-minutes: 4
        run: |
          nvim --version
          make test

  windows:
    name: "windows-latest"
    runs-on: windows-latest
    if: github.event.pull_request.draft == false
    continue-on-error: true # windows support is still experimental
    defaults:
      run:
        shell: pwsh
    steps:
      # it's not currently possbile to run tests on windows, see nvim-lua/plenary.nvim#255
      - uses: actions/checkout@v3

      - name: Install neovim binary
        uses: rhysd/action-setup-vim@v1
        with:
          neovim: true
          version: v0.8.0

      - name: Install LunarVim
        timeout-minutes: 4
        run: |
          echo "$HOME/.local/bin" >> $GITHUB_PATH
          pwsh.exe -NoLogo -ExecutionPolicy Bypass -NonInteractive -Command "./utils/installer/install.ps1 --local"