Skip to content

Commit b24e980

Browse files
committed
ci: run parser tests and stylua on push
Two jobs on every push and pull request: - `test`: installs Neovim stable and plenary.nvim, then runs the parser spec suite headlessly via `PlenaryBustedDirectory`. - `stylua`: checks formatting of `lua/` and `tests/` against the repo's `stylua.toml`.
1 parent c5e3412 commit b24e980

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

‎.github/workflows/test.yml‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
name: Parser tests
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Install Neovim
16+
uses: rhysd/action-setup-vim@v1
17+
with:
18+
neovim: true
19+
version: stable
20+
21+
- name: Install plenary.nvim
22+
run: |
23+
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim \
24+
"$HOME/.local/share/nvim/site/pack/vendor/start/plenary.nvim"
25+
26+
- name: Run tests
27+
run: |
28+
nvim --headless --noplugin \
29+
-u tests/minimal_init.lua \
30+
-c "PlenaryBustedDirectory tests/ {minimal_init='tests/minimal_init.lua',sequential=true}"
31+
32+
stylua:
33+
name: StyLua formatting
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: JohnnyMorganz/stylua-action@v4
38+
with:
39+
token: ${{ secrets.GITHUB_TOKEN }}
40+
version: latest
41+
args: --check lua/ tests/

0 commit comments

Comments
 (0)