This commit is contained in:
windwp 2021-03-13 07:52:51 +07:00 committed by GitHub
parent 50410bf1d3
commit c404074515
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 0 deletions

32
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: Tests
on: [push, pull_request]
jobs:
x64-ubuntu:
name: X64-ubuntu
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: date +%F > todays-date
- name: Restore cache for today's nightly.
uses: actions/cache@v2
with:
path: |
_neovim
key: ${{ runner.os }}-x64-${{ hashFiles('todays-date') }}
- name: Prepare
run: |
mkdir -p ~/.vim/autoload
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.vim/autoload/plenary.nvim
git clone --depth 1 https://github.com/nvim-lua/popup.nvim ~/.vim/autoload/popup.nvim
git clone --depth 1 https://github.com/nvim-treesitter/nvim-treesitter ~/.vim/autoload/nvim-treesitter
git clone --depth 1 https://github.com/nvim-treesitter/playground ~/.vim/autoload/playground
ln -s $(pwd) ~/.vim/autoload
- name: Run tests
run: |
curl -OL https://raw.githubusercontent.com/norcalli/bot-ci/master/scripts/github-actions-setup.sh
source github-actions-setup.sh nightly-x64
nvim --headless -u tests/minimal.vim -c "TSInstallSync all" -c "q"
make test

View File

@ -17,9 +17,14 @@ set nocindent
set nosmartindent
set indentexpr=
TSUpdate
lua << EOF
local _, ts_utils = pcall(require, 'nvim-treesitter.ts_utils')
_G.T=ts_utils
require("plenary/busted")
require("nvim-ts-autotag").setup()
EOF