-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.41 KB
/
ci.yml
File metadata and controls
55 lines (46 loc) · 1.41 KB
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
45
46
47
48
49
50
51
52
53
54
55
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
neovim: ['v0.11.0', 'nightly']
steps:
- uses: actions/checkout@v4
- name: Setup Neovim
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: ${{ matrix.neovim }}
- name: Install LuaRocks
run: sudo apt-get install -y luarocks
- name: Install luacov
run: |
sudo luarocks install luacov
sudo luarocks install luacov-reporter-lcov
- name: Clone plenary.nvim
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
- name: Run tests
run: ./scripts/test.sh
- name: Run tests with coverage
if: matrix.neovim == 'v0.11.0'
env:
LUA_PATH: '/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;;'
LUA_CPATH: '/usr/local/lib/lua/5.1/?.so;;'
run: ./scripts/test-coverage.sh
- name: Upload coverage to Codecov
if: matrix.neovim == 'v0.11.0'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./lcov.info
fail_ci_if_error: false