Problem: plenary.nvim is deprecated. The test suite depends on plenary's async test runner and coroutine-based utilities, tying the project to an unmaintained dependency. CI also tests against Neovim 0.8-0.11, which are no longer relevant. Solution: replace plenary with busted + nlua (nvim -l). Convert all async test patterns (a.wrap, a.util.sleep, a.util.scheduler) to synchronous equivalents using vim.wait. Rename tests/ to spec/ to follow busted convention. Replace the CI test matrix with nvim-busted-action targeting stable/nightly only. Add .busted config, luarocks test_dependencies, and update the nix devshell.
60 lines
1.2 KiB
YAML
60 lines
1.2 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
workflow_call:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
selene:
|
|
name: Selene
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: NTBBloodbath/selene-action@v1.0.0
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
args: --display-style quiet .
|
|
|
|
stylua:
|
|
name: StyLua
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Stylua
|
|
uses: JohnnyMorganz/stylua-action@v4
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
version: v2.1.0
|
|
args: --check lua spec
|
|
|
|
typecheck:
|
|
name: typecheck
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: mrcjkb/lua-typecheck-action@v0
|
|
with:
|
|
checklevel: Warning
|
|
directories: lua
|
|
configpath: .luarc.json
|
|
|
|
run_tests:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
nvim_version:
|
|
- stable
|
|
- nightly
|
|
|
|
name: Run tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: nvim-neorocks/nvim-busted-action@v1
|
|
with:
|
|
nvim_version: ${{ matrix.nvim_version }}
|