-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
7 changed files
with
141 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Validate | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
format: | ||
name: format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: JohnnyMorganz/stylua-action@1.0.0 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --color always --check lua/ | ||
|
||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y luarocks | ||
sudo luarocks install luacheck | ||
- name: Lint | ||
run: sudo make lint | ||
|
||
# Neatly stolen from telescope.nvim | ||
test: | ||
name: test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
url: https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.tar.gz | ||
manager: sudo apt-get | ||
packages: -y fd-find | ||
- os: ubuntu-latest | ||
url: https://github.com/neovim/neovim/releases/download/v0.7.0/nvim-linux64.tar.gz | ||
manager: sudo apt-get | ||
packages: -y fd-find | ||
- os: macos-latest | ||
url: https://github.com/neovim/neovim/releases/download/nightly/nvim-macos.tar.gz | ||
manager: brew | ||
packages: fd | ||
- os: macos-latest | ||
url: https://github.com/neovim/neovim/releases/download/v0.7.0/nvim-macos.tar.gz | ||
manager: brew | ||
packages: fd | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: date +%F > todays-date | ||
- name: Restore from todays cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: _neovim | ||
key: ${{ runner.os }}-${{ matrix.url }}-${{ hashFiles('todays-date') }} | ||
|
||
- name: Prepare | ||
run: | | ||
${{ matrix.manager }} update | ||
${{ matrix.manager }} install ${{ matrix.packages }} | ||
test -d _neovim || { | ||
mkdir -p _neovim | ||
curl -sL ${{ matrix.url }} | tar xzf - --strip-components=1 -C "${PWD}/_neovim" | ||
} | ||
mkdir -p ~/.local/share/nvim/site/pack/vendor/start | ||
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim | ||
ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start | ||
- name: Run tests | ||
run: | | ||
export PATH="${PWD}/_neovim/bin:${PATH}" | ||
export VIM="${PWD}/_neovim/share/nvim/runtime" | ||
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
cache = true | ||
|
||
codes = true | ||
|
||
self = false | ||
|
||
read_globals = { | ||
"vim", | ||
} |
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,10 @@ | ||
test: | ||
nvim --headless \ | ||
-u scripts/minimal.vim \ | ||
-c "PlenaryBustedDirectory lua/tests/automated { minimal_init = './scripts/minimal.vim' }" | ||
|
||
format: | ||
stylua lua/ | ||
|
||
lint: | ||
luacheck lua |
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,8 @@ | ||
local M = {} | ||
|
||
function M.setup(opts) | ||
opts = opts or {} | ||
print(vim.inspect(opts)) | ||
end | ||
|
||
return M |
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,5 @@ | ||
describe("java_util", function() | ||
it("delete me", function() | ||
assert.is_true(true) | ||
end) | ||
end) |
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,22 @@ | ||
" Grabbing source code | ||
set rtp+=. | ||
|
||
" Using local versions of plenary and nvim-treesitter if possible | ||
" This is required for CI | ||
set rtp+=../plenary.nvim | ||
set rtp+=../nvim-treesitter | ||
|
||
" If you use vim-plug if you got it locally | ||
set rtp+=~/.vim/plugged/plenary.nvim | ||
set rtp+=~/.vim/plugged/nvim-treesitter | ||
|
||
" If you are using packer | ||
set rtp+=~/.local/share/nvim/site/pack/packer/start/plenary.nvim | ||
set rtp+=~/.local/share/nvim/site/pack/packer/start/nvim-treesitter | ||
|
||
" If you are using lunarvim | ||
set rtp+=~/.local/share/lunarvim/site/pack/packer/start/plenary.nvim | ||
set rtp+=~/.local/share/lunarvim/site/pack/packer/start/nvim-treesitter | ||
|
||
runtime! plugin/plenary.vim | ||
runtime! plugin/nvim-treesitter.lua |
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,6 @@ | ||
column_width = 120 | ||
line_endings = "Unix" | ||
indent_type = "Spaces" | ||
indent_width = 2 | ||
quote_style = "AutoPreferDouble" | ||
call_parentheses = "Always" |