-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (55 loc) · 1.58 KB
/
test.yml
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
name: Test
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
push:
branches:
- main
# TODO: Remove this later
- fix_rockspec
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest]
neovim: [stable]
runs-on: ${{ matrix.os }}
name: "OS: ${{ matrix.os }} - Neovim: ${{ matrix.neovim }}"
steps:
- name: Checkout
uses: actions/checkout@master
- name: Install A Lua Interpreter
uses: leafo/gh-actions-lua@v10
with:
# Neovim is compiled with LuaJIT so we might as well match. But it
# doesn't look like we can match it exactly.
#
# Reference:
# https://github.com/leafo/gh-actions-lua/issues/49#issuecomment-2295071198
#
luaVersion: "luajit-openresty"
- name: Install Luarocks
uses: leafo/gh-actions-luarocks@v4
- name: Install Neovim
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: ${{ matrix.neovim }}
# We need this hack until a better solution is available.
#
# Reference: https://github.com/nvim-neorocks/luarocks-tag-release/issues/435
#
- name: Expand The Template Rockspec
uses: ColinKennedy/luarocks-rockspec-expander@main
with:
input: template.rockspec
output: plugin-template-scm-1.rockspec
delete_input_after: true
- name: Build Test Dependencies
run: |
luarocks test plugin-template-scm-1.rockspec --prepare
- name: Test
run: |
luarocks test --test-type busted