-
-
Notifications
You must be signed in to change notification settings - Fork 961
87 lines (75 loc) · 1.94 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Dev
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
if: github.event.pull_request.draft == false
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
neovim:
- "stable"
- "nightly"
node:
- "20"
include:
# only enable coverage on the fastest job
- node: "20"
ENABLE_CODE_COVERAGE: true
env:
NODE_ENV: test
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: "npm"
- name: Setup python3
uses: actions/setup-python@v5
with:
python-version: "3.x"
- run: pip install pynvim
- name: Setup vim
uses: rhysd/action-setup-vim@v1
id: vim
with:
version: v9.0.0815
- name: Setup neovim
id: nvim
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: ${{ matrix.neovim }}
- name: Install Dependencies
run: |
npm i -g bytes
npm ci
sudo apt-get install -y ripgrep exuberant-ctags
rg --version
ctags --version
vim --version
nvim --version
- name: Run jest
env:
VIM_COMMAND: ${{ steps.vim.outputs.executable }}
NVIM_COMMAND: ${{ steps.nvim.outputs.executable }}
run: |
node --max-old-space-size=4096 --expose-gc ./node_modules/.bin/jest --maxWorkers=2 --coverage --forceExit
- name: Codecov
uses: codecov/codecov-action@v4
if: ${{ matrix.ENABLE_CODE_COVERAGE }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
verbose: true