File tree Expand file tree Collapse file tree 4 files changed +65
-4
lines changed Expand file tree Collapse file tree 4 files changed +65
-4
lines changed Original file line number Diff line number Diff line change 1+ name : Tests
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ unit_tests :
7+ name : unit tests
8+ runs-on : ${{ matrix.os }}
9+ timeout-minutes : 30
10+ strategy :
11+ fail-fast : false
12+ matrix :
13+ include :
14+ - os : ubuntu-20.04
15+ url : https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.tar.gz
16+ manager : sudo apt-get
17+ # packages: -y fd-find mlocate
18+ - os : ubuntu-20.04
19+ url : https://github.com/neovim/neovim/releases/download/v0.7.0/nvim-linux64.tar.gz
20+ manager : sudo apt-get
21+ # packages: -y fd-find mlocate
22+ steps :
23+ - uses : actions/checkout@v2
24+ - run : date +%F > todays-date
25+ - name : Restore from todays cache
26+ uses : actions/cache@v2
27+ with :
28+ path : _neovim
29+ key : ${{ runner.os }}-${{ matrix.url }}-${{ hashFiles('todays-date') }}
30+
31+ - name : Prepare
32+ run : |
33+ ${{ matrix.manager }} update
34+ ${{ matrix.manager }} install ${{ matrix.packages }}
35+ test -d _neovim || {
36+ mkdir -p _neovim
37+ curl -sL ${{ matrix.url }} | tar xzf - --strip-components=1 -C "${PWD}/_neovim"
38+ }
39+ mkdir -p ~/.local/share/nvim/site/pack/vendor/start
40+ git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
41+ git clone --depth 1 https://github.com/nvim-telescope/telescope.nvim ~/.local/share/nvim/site/pack/vendor/start/telescope.nvim
42+ ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start
43+
44+ - name : Run tests
45+ run : |
46+ export PATH="${PWD}/_neovim/bin:${PATH}"
47+ nvim --version
48+ make test_ci
Original file line number Diff line number Diff line change 1- .PHONY : lint stylua
1+ .PHONY : test_ci, lint stylua
22
3+ all : test_ci lint
4+
5+ test_ci :
6+ @nvim --headless -c " PlenaryBustedDirectory lua/tests/ {}"
37
48lint :
5- luacheck lua/telescope
9+ @ luacheck lua/telescope
610
711stylua :
8- stylua --color always lua/
9-
12+ @stylua --color always lua/
1013
Original file line number Diff line number Diff line change 1+ describe (' sanity check tests: ' , function ()
2+ it (' Telescope builtin' , function ()
3+ vim .cmd [[ Telescope builtin]]
4+ end )
5+ end )
Original file line number Diff line number Diff line change 1+ describe (' plugin smoke tests: ' , function ()
2+ it (' Telescope luasnip' , function ()
3+ vim .cmd [[ Telescope luasnip]]
4+ end )
5+ end )
You can’t perform that action at this time.
0 commit comments