Skip to content

Commit

Permalink
add tests to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Steinke committed Apr 9, 2024
1 parent 6b62bd7 commit 75f4479
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Test

on: [push]

jobs:

test:
name: Run Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: rhysd/action-setup-vim@v1
id: vim
with:
neovim: true
version: 0.9.5

- name: run test
run: make test
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test:
nvim --headless -u ./tests/minimal_init.lua -i NONE -n --noplugin -c 'PlenaryBustedDirectory tests'
2 changes: 1 addition & 1 deletion lua/lsp-preview/diff.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
-- for their work <3

local lEdits = require("lsp-preview.buffer_edits")
local minidiff = require("mini.diff")

local M = {}

Expand Down Expand Up @@ -153,6 +152,7 @@ end

---@return string filetype
function Edit:preview(bufnr, winid, opts)
local minidiff = require("mini.diff")
opts = opts or {}

-- set lines in buffer to the changed output
Expand Down

0 comments on commit 75f4479

Please sign in to comment.