-
Notifications
You must be signed in to change notification settings - Fork 53
98 lines (82 loc) · 2.59 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
88
89
90
91
92
93
94
95
96
97
98
name: ci
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- master
pull_request:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# Set NVIM_NODE_LOG_FILE to exercise related codepaths.
NVIM_NODE_LOG_FILE: 'node-client.test.log'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test:
strategy:
fail-fast: false
matrix:
node: ['14', '16', '18', '20']
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
exclude:
- os: macos-latest
node: '14'
- os: macos-latest
node: '16'
- os: windows-latest
node: '14'
- os: windows-latest
node: '16'
include:
- os: ubuntu-latest
NIGHTLY: nvim-linux64.tar.gz
NVIM_BIN_PATH: nvim-linux64/bin
EXTRACT: tar xzf
- os: macos-latest
NIGHTLY: nvim-macos-x86_64.tar.gz
NVIM_BIN_PATH: nvim-macos-x86_64/bin
EXTRACT: tar xzf
- os: windows-latest
NIGHTLY: nvim-win64.zip
NVIM_BIN_PATH: nvim-win64/bin
EXTRACT: unzip
runs-on: ${{ matrix.os }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: npm
node-version: ${{ matrix.node }}
- name: update npm (for node.js 14)
if: matrix.node == '14'
run: npm install -g 'npm@^8.8.0'
- name: install neovim
run: |
curl -LO 'https://github.com/neovim/neovim/releases/download/nightly/${{ matrix.NIGHTLY }}'
${{ matrix.EXTRACT }} ${{ matrix.NIGHTLY }}
echo '${{ runner.os }}'
- name: update path (bash)
if: runner.os != 'Windows'
run: echo "$(pwd)/${{ matrix.NVIM_BIN_PATH }}" >> $GITHUB_PATH
- name: update path (windows)
if: runner.os == 'Windows'
run: echo "$(pwd)/${{ matrix.NVIM_BIN_PATH }}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: install dependencies
run: npm ci
- name: build
run: npm run build
- name: lint
# Skip on old Node.js, devDependencies use newish JS features.
if: matrix.node != '14'
run: npm run lint
- name: test
run: |
echo $PATH
which nvim
nvim --version
npm run test-build --stream
- uses: codecov/codecov-action@v4
if: matrix.node == '20'
with:
verbose: true # optional (default = false)