-
Notifications
You must be signed in to change notification settings - Fork 26
44 lines (37 loc) · 1.27 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Tests
on: [push, pull_request]
jobs:
unit_tests:
name: unit tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
url: https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.tar.gz
steps:
- uses: actions/checkout@v3
- id: todays-date
run: echo date="$(date +%F)" >> $GITHUB_OUTPUT
shell: bash
- name: Restore cache for today's nightly.
uses: actions/cache@v2
with:
path: _neovim
key: ${{ runner.os }}-x64-${{ steps.todays-date.outputs.date }}
- name: Prepare
run: |
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
# sudo apt install go
test -d _neovim || {
mkdir -p _neovim
curl -sL ${{ matrix.url }} | tar xzf - --strip-components=1 -C "${PWD}/_neovim"
}
echo "${PWD}/_neovim/bin" >> $GITHUB_PATH
- name: Run tests
run: |
nvim --headless -u tests/minimal.vim -c "q"
make test