Skip to content

Commit e310600

Browse files
authored
test: use vusted for tests (#115)
1 parent 140938b commit e310600

File tree

6 files changed

+24
-43
lines changed

6 files changed

+24
-43
lines changed

.github/workflows/test.yaml

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,39 @@ on:
55
branches:
66
- main
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
11+
812
jobs:
913
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 }}
1115
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]
2720
runs-on: ${{ matrix.os }}
2821
steps:
2922
- 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+
3031
- run: date +%F > todays-date
32+
3133
- name: Restore cache for today's nightly.
3234
uses: actions/cache@v4
3335
with:
3436
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+
4542
- name: Run tests
46-
run: |
47-
export PATH="$PWD/_neovim/bin:$PATH"
48-
nvim --version
49-
make test
43+
run: vusted tests

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
plenary.nvim

Makefile

Lines changed: 0 additions & 2 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

tests/minimal_init.lua

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)