-
Notifications
You must be signed in to change notification settings - Fork 13
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
98 additions
and
214 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 |
---|---|---|
@@ -1,33 +1,48 @@ | ||
--- | ||
name: CI | ||
|
||
on: | ||
pull_request: ~ | ||
push: | ||
branches: | ||
- master | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Run tests | ||
commit_lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Check commit messages | ||
- uses: webiny/action-conventional-commits@v1.1.0 | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
neovim_branch: ["v0.8.1", "nightly"] | ||
neovim_branch: | ||
- 'v0.9.5' | ||
- 'nightly' | ||
|
||
env: | ||
NVIM_TEST_VERSION: ${{ matrix.neovim_branch }} | ||
|
||
steps: | ||
# Checkout packer | ||
- uses: actions/checkout@v2 | ||
|
||
# Prepare taken from telescope | ||
- name: Prepare | ||
run: | | ||
mkdir -p _neovim | ||
curl -sL https://github.com/neovim/neovim/releases/download/${{ matrix.neovim_branch }}/nvim-linux64.tar.gz | tar xzf - --strip-components=1 -C "${PWD}/_neovim" | ||
- name: Run tests | ||
run: | | ||
export PATH="${PWD}/_neovim/bin:${PATH}" | ||
export VIM="${PWD}/_neovim/share/nvim/runtime" | ||
nvim --version | ||
make test | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- uses: leafo/gh-actions-lua@v9 | ||
with: | ||
luaVersion: "5.1.5" | ||
|
||
- uses: leafo/gh-actions-luarocks@v4 | ||
|
||
- name: Download nvim-test | ||
run: make nvim-test | ||
|
||
- name: Run Test | ||
run: 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,10 @@ | ||
|
||
nvim-test: | ||
git clone https://github.com/lewis6991/nvim-test | ||
nvim-test/bin/nvim-test --init | ||
|
||
.PHONY: test | ||
test: nvim-test | ||
nvim-test/bin/nvim-test test \ | ||
--lpath=$(PWD)/lua/?.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,50 @@ | ||
local helpers = require('nvim-test.helpers') | ||
local exec_lua = helpers.exec_lua | ||
local eq = helpers.eq | ||
|
||
describe('plugin spec formats', function() | ||
before_each(function() | ||
helpers.clear() | ||
|
||
-- Make pckr available | ||
exec_lua('package.path = ...', package.path) | ||
end) | ||
|
||
it('can process a simple string spec', function() | ||
eq({ | ||
['gitsigns.nvim'] = { | ||
install_path = '/gitsigns.nvim', | ||
installed = false, | ||
name = 'gitsigns.nvim', | ||
revs = { }, | ||
simple = true, | ||
type = 'git', | ||
url = 'https://github.com/lewis6991/gitsigns.nvim' | ||
} }, exec_lua[[ | ||
return require('pckr.plugin').process_spec { 'lewis6991/gitsigns.nvim' } | ||
]]) | ||
end) | ||
|
||
it('can process a simple table spec', function() | ||
exec_lua[[ | ||
require('pckr.plugin').process_spec { | ||
} | ||
]] | ||
eq({ | ||
['gitsigns.nvim'] = { | ||
install_path = '/gitsigns.nvim', | ||
installed = false, | ||
name = 'gitsigns.nvim', | ||
revs = { }, | ||
simple = false, | ||
tag = 'v0.7', | ||
type = 'git', | ||
url = 'https://github.com/lewis6991/gitsigns.nvim' | ||
} }, exec_lua[[ | ||
return require('pckr.plugin').process_spec { | ||
{ 'lewis6991/gitsigns.nvim', tag = "v0.7" } | ||
} | ||
]]) | ||
end) | ||
|
||
end) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.