-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
160 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Tests | ||
on: [push] | ||
jobs: | ||
test: | ||
name: unit tests | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
version: [v0.9.0, nightly] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: date +%F > todays-date | ||
|
||
- uses: rhysd/action-setup-vim@v1 | ||
with: | ||
neovim: true | ||
version: ${{ matrix.version }} | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: deps | ||
key: ${{ runner.os }}-deps-${{ matrix.version }}-${{ hashFiles('todays-date') }} | ||
restore-keys: | | ||
${{ runner.os }}-deps-${{ matrix.version }}- | ||
- name: Run tests | ||
run: | | ||
nvim --version | ||
make test | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
doc/tags | ||
deps/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,37 @@ | ||
docgen: | ||
.PHONY: docgen test clean | ||
|
||
DEPS_DIR := deps | ||
TS_DIR := $(DEPS_DIR)/tree-sitter-lua | ||
PLENARY_DIR := $(DEPS_DIR)/plenary.nvim | ||
TELESCOPE_DIR := $(DEPS_DIR)/telescope.nvim | ||
|
||
define git_clone_or_pull | ||
@mkdir -p $(dir $1) | ||
@if [ ! -d "$1" ]; then \ | ||
git clone --depth 1 $2 $1; \ | ||
else \ | ||
git -C "$1" pull; \ | ||
fi | ||
endef | ||
|
||
$(DEPS_DIR): | ||
@mkdir -p $@ | ||
|
||
plenary: | $(DEPS_DIR) | ||
$(call git_clone_or_pull,$(PLENARY_DIR),https://github.com/nvim-lua/plenary.nvim) | ||
|
||
docgen-deps: plenary | $(DEPS_DIR) | ||
$(call git_clone_or_pull,$(TS_DIR),https://github.com/tjdevries/tree-sitter-lua) | ||
cd "$(TS_DIR)" && make dist | ||
|
||
test-deps: plenary | $(DEPS_DIR) | ||
$(call git_clone_or_pull,$(TELESCOPE_DIR),https://github.com/nvim-telescope/telescope.nvim) | ||
|
||
docgen: docgen-deps | ||
nvim --headless --noplugin -u scripts/minimal_init.vim -c "luafile ./scripts/gendocs.lua" -c 'qa' | ||
|
||
test: test-deps | ||
nvim --headless --noplugin -u scripts/minimal_init.vim -c "PlenaryBustedDirectory lua/tests/ { minimal_init = './scripts/minimal_init.vim' }" | ||
|
||
clean: | ||
@rm -rf $(DEPS_DIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
set rtp+=. | ||
set rtp+=../plenary.nvim/ | ||
set rtp+=../popup.nvim/ | ||
set rtp+=../tree-sitter-lua/ | ||
set rtp+=deps/plenary.nvim/ | ||
set rtp+=deps/telescope.nvim/ | ||
set rtp+=deps/tree-sitter-lua/ | ||
|
||
runtime! plugin/plenary.vim |