|
5 | 5 | branches: |
6 | 6 | - main |
7 | 7 |
|
| 8 | +concurrency: |
| 9 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 10 | + cancel-in-progress: ${{ github.event_name == 'pull_request' }} |
| 11 | + |
8 | 12 | jobs: |
9 | 13 | unit_tests: |
10 | | - name: Run tests on ${{ matrix.os }} with Neovim ${{ matrix.neovim }} |
| 14 | + name: Run tests on ${{ matrix.os }} with Neovim ${{ matrix.nvim_version }} |
11 | 15 | strategy: |
12 | | - fail-fast: false |
13 | | - matrix: |
14 | | - include: |
15 | | - - os: ubuntu-latest |
16 | | - neovim: stable |
17 | | - url: https://github.com/neovim/neovim/releases/download/stable/nvim-linux-x86_64.tar.gz |
18 | | - - os: ubuntu-latest |
19 | | - neovim: nightly |
20 | | - url: https://github.com/neovim/neovim/releases/download/nightly/nvim-linux-x86_64.tar.gz |
21 | | - - os: macos-14 |
22 | | - neovim: stable |
23 | | - url: https://github.com/neovim/neovim/releases/download/stable/nvim-macos-arm64.tar.gz |
24 | | - - os: macos-14 |
25 | | - neovim: nightly |
26 | | - url: https://github.com/neovim/neovim/releases/download/nightly/nvim-macos-arm64.tar.gz |
| 16 | + fail-fast: false |
| 17 | + matrix: |
| 18 | + os: [windows-latest, ubuntu-latest, macos-latest] |
| 19 | + nvim_version: [stable, nightly] |
27 | 20 | runs-on: ${{ matrix.os }} |
28 | 21 | steps: |
29 | 22 | - uses: actions/checkout@v4 |
| 23 | + - uses: notomo/action-setup-nvim-lua@v2 |
| 24 | + |
| 25 | + - name: Setup neovim |
| 26 | + uses: rhysd/action-setup-vim@v1 |
| 27 | + with: |
| 28 | + neovim: true |
| 29 | + version: ${{ matrix.nvim_version }} |
| 30 | + |
30 | 31 | - run: date +%F > todays-date |
| 32 | + |
31 | 33 | - name: Restore cache for today's nightly. |
32 | 34 | uses: actions/cache@v4 |
33 | 35 | with: |
34 | 36 | path: _neovim |
35 | | - key: ${{ runner.os }}-${{ matrix.url }}-${{ hashFiles('todays-date') }} |
36 | | - - name: Prepare |
37 | | - run: | |
38 | | - test -d _neovim || { |
39 | | - mkdir -p _neovim |
40 | | - curl -sL ${{ matrix.url }} | tar xzf - --strip-components=1 -C "$PWD/_neovim" |
41 | | - } |
42 | | - mkdir -p ~/.local/share/nvim/site/pack/vendor/start |
43 | | - git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim |
44 | | - ln -s $PWD ~/.local/share/nvim/site/pack/vendor/start |
| 37 | + key: ${{ runner.os }}-${{ matrix.nvim_version }}-${{ hashFiles('todays-date') }} |
| 38 | + |
| 39 | + - name: Install vusted |
| 40 | + run: luarocks install vusted |
| 41 | + |
45 | 42 | - name: Run tests |
46 | | - run: | |
47 | | - export PATH="$PWD/_neovim/bin:$PATH" |
48 | | - nvim --version |
49 | | - make test |
| 43 | + run: vusted tests |
0 commit comments