Skip to content

Commit de3391f

Browse files
committed
Create boilerplate files
0 parents  commit de3391f

File tree

6 files changed

+79
-0
lines changed

6 files changed

+79
-0
lines changed

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*.lua]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true

.github/workflows/linter.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Lint Code Base
3+
on:
4+
pull_request: ~
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
build:
11+
name: Lint Code Base
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout Code
16+
uses: actions/checkout@v2
17+
18+
- name: Lint Code Base
19+
uses: github/super-linter@v3
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
VALIDATE_JSCPD: false
23+
VALIDATE_PYTHON_BLACK: false

.github/workflows/tests.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Run tests
3+
on:
4+
pull_request: ~
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
build:
11+
name: Run tests
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- run: date +%F > todays-date
17+
- name: Restore cache for today's nightly.
18+
uses: actions/cache@v2
19+
with:
20+
path: _neovim
21+
key: ${{ runner.os }}-x64-${{ hashFiles('todays-date') }}
22+
23+
- name: Prepare plenary
24+
run: |
25+
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
26+
ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start
27+
28+
- name: Run tests
29+
run: |
30+
curl -OL https://raw.githubusercontent.com/norcalli/bot-ci/master/scripts/github-actions-setup.sh
31+
source github-actions-setup.sh nightly-x64
32+
nvim --headless --noplugin -u tests/minimal.vim -c "PlenaryBustedDirectory tests/ {minimal_init = 'tests/minimal.vim'}"

.luacheckrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ignore = {
2+
"631", -- max_line_length
3+
}
4+
read_globals = {
5+
"vim",
6+
"describe",
7+
"it"
8+
}

tests/minimal.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
set rtp+=.
2+
set rtp+=../plenary.nvim
3+
runtime! plugin/plenary.vim

tests/spec_example.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
describe('Test example', function()
2+
it('Test can access vim namespace', function()
3+
assert.are.same(vim.trim(' a '), 'a')
4+
end)
5+
end)

0 commit comments

Comments
 (0)