-
-
Notifications
You must be signed in to change notification settings - Fork 85
228 lines (226 loc) · 11.8 KB
/
test.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
name: Run Tests
permissions: read-all
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
merge_group:
branches: [main]
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
# XXX: restore this once neovim tests work in CI
# os: [macos-latest, ubuntu-latest, windows-latest]
#os: [windows-latest]
os: [ubuntu-latest]
# os: [macos-latest, ubuntu-latest, windows-latest]
# XXX - stable is 0.10.0 and only has nvim.exe (no nvim-qt.exe). Also locally it hangs on unskipped test
# and on CI, it fails on trying to tail the log and I don't know what is happening since didnt get a snapshot of CI yet
# to understand the error in nvim.exe (though probably need the nvim-qt.exe since nvim.exe won't show anything)
# Linux: with 0.9.5 or stable, it hangs on first function call back into lua from node
# app_version: [stable]
#app_version: [v0.9.5]
# NB: Nightly is NVIM v0.11.0-dev-25+g0e187fe03 in May 2024
# app_version: [v0.9.5, v0.10.0, stable, nightly]
app_version: [v0.10.0]
# XXX error while downloading v16.20.2, v17.9.1 on macos/ubuntu at least
# node_version: [v18.20.2, v19.9.0, v20.13.1, v21.7.3, v22.2.0]
node_version: [v18.20.2]
# XXX: restore this once neovim tests work in CI
# include:
# - os: ubuntu-latest
# app_version: legacy
runs-on: ${{ matrix.os }}
env:
APP_VERSION: ${{ matrix.app_version }}
APP_CRASH_DIR: ${{ github.workspace }}/artifacts/dumps
APP_LOGS_DIR: ${{ github.workspace }}/artifacts/logs
CURSORLESS_REPO_ROOT: ${{ github.workspace }}
steps:
- uses: actions/checkout@v4
- run: corepack enable
# XXX - run over different node versions: https://nodejs.org/en/about/previous-releases
- uses: actions/setup-node@v4
with:
# XXX - v20.12.1 taken from .nvmrc file?
# node-version-file: .nvmrc
node-version: ${{ matrix.node_version }}
# node-version: v21.7.1
cache: pnpm
# XXX testing only
# - run: dir ${{ github.workspace }}
# - run: dir ${{ github.workspace }}/packages
# - run: dir ${{ github.workspace }}/packages/test-harness
- run: mkdir -p "${{ env.APP_CRASH_DIR }}" "${{ env.APP_LOGS_DIR }}"
shell: bash
# NB: we can't comment this for speeding up testing as we get this error when running test harness:
# > @cursorless/[email protected] testNeovim D:\a\cursorless\cursorless\packages\test-harness
# > env CURSORLESS_MODE=test my-ts-node src/scripts/runNeovimTestsCI.ts
# env: 'my-ts-node': No such file or directory
# D:\a\cursorless\cursorless\packages\test-harness:
# ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @cursorless/[email protected] testNeovim: `env CURSORLESS_MODE=test my-ts-node src/scripts/runNeovimTestsCI.ts`
# spawn ENOENT
# WARN Local package.json exists, but node_modules missing, did you mean to install?
# Error: Process completed with exit code 1.
- run: pnpm --color install
- run: pnpm --color compile
#- run: dir D:\a\cursorless\cursorless\packages\cursorless-neovim\out\
# We need to run "build" in order to prepare the dist/cursorless.nvim folder
- run: pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build
#- run: xvfb-run -a pnpm --color test
# if: runner.os == 'Linux'
# - run: pnpm --color test
# if: runner.os != 'Linux'
# Current working directory:
# - Windows: D:\a\cursorless\cursorless
# - Linux: /home/runner/work/cursorless/cursorless
# - OS X: /Users/runner/work/cursorless/cursorless
- run: pwd
- run: tree /home/runner/work/cursorless/cursorless/dist
if: runner.os == 'Linux'
- run: tree /f D:\a\cursorless\cursorless\dist
if: runner.os == 'Windows'
- run: find /Users/runner/work/cursorless/cursorless/dist
if: runner.os == 'macOS'
# - run: dir
#- run: dir C:\Users\runneradmin\AppData\Local
# Directory: C:\Users\runneradmin\AppData\Local
# Mode LastWriteTime Length Name
# ---- ------------- ------ ----
# d---- 5/15/2024 11:25 PM .IdentityService
# d---- 5/15/2024 11:24 PM AzureFunctionsTools
# d---- 5/16/2024 11:19 AM GitHub
# d---- 5/15/2024 11:13 PM Google
# d---- 5/16/2024 11:13 AM Microsoft
# d---- 5/15/2024 11:17 PM Microsoft SDKs
# d---- 5/16/2024 11:14 AM Mozilla
# d---- 5/16/2024 11:20 AM node
# d---- 5/15/2024 11:13 PM Packages
# d---- 5/15/2024 11:14 PM PeerDistRepub
# d---- 5/16/2024 11:20 AM pnpm
# d---- 5/15/2024 11:17 PM ServiceHub
# d---- 5/16/2024 11:21 AM Temp
- name: Install cursorless.nvim dependencies
run: npm install -g [email protected]
- run: git clone https://github.com/vim-scripts/BufOnly.vim /home/runner/BufOnly.vim
if: runner.os == 'Linux'
- run: git clone https://github.com/hands-free-vim/talon.nvim /home/runner/talon.nvim
if: runner.os == 'Linux'
- run: git clone https://github.com/MunifTanjim/nui.nvim /home/runner/nui.nvim
if: runner.os == 'Linux'
- run: git clone https://github.com/folke/noice.nvim /home/runner/noice.nvim
if: runner.os == 'Linux'
- run: git clone https://github.com/vim-scripts/BufOnly.vim C:\Users\runneradmin\BufOnly.vim
if: runner.os == 'Windows'
- run: git clone https://github.com/hands-free-vim/talon.nvim C:\Users\runneradmin\talon.nvim
if: runner.os == 'Windows'
- run: git clone https://github.com/vim-scripts/BufOnly.vim /Users/runner//BufOnly.vim
if: runner.os == 'macOS'
- run: git clone https://github.com/hands-free-vim/talon.nvim /Users/runner//talon.nvim
if: runner.os == 'macOS'
# - run: C:\Users\runneradmin\nvim-stable\bin\nvim.exe -l ${{ github.workspace }}\packages\test-harness\src\config\empty.lua
# C:\Users\runneradmin\nvim-stable\bin\nvim.exe: D:\a\_temp\2658188c-43d2-4fce-9de9-299408299ebb.ps1:2
# Line |
# 2 | C:\Users\runneradmin\nvim-stable\bin\nvim.exe -l D:\a\cursorless\curs …
# | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | The term 'C:\Users\runneradmin\nvim-stable\bin\nvim.exe' is not recognized as a name of a cmdlet, function,
# | script file, or executable program. Check the spelling of the name, or if a path was included, verify that the
# | path is correct and try again.
# Error: Process completed with exit code 1.
#- run: mkdir C:\Users\runneradmin\AppData\Local\nvim
# Run rhysd/action-setup-vim@v1 fails with "app_version: legacy"
# Error: 'version' input 'legacy' is not a format of Git tags in neovim/neovim repository. It should match to regex //^v\d+\.\d+\.\d+$//. NOTE: It requires 'v' prefix
- name: Install Neovim
uses: rhysd/action-setup-vim@v1
id: vim
with:
version: ${{ matrix.app_version }}
neovim: true
# - run: dir /home/runner/.local/share/ || true
# - run: dir /home/runner/.local/share/nvim/ || true
# - run: dir /home/runner/.config/ || true
# - run: dir /home/runner/.config/nvim/ || true
# - run: ${{ steps.vim.outputs.executable }} -l ${{ github.workspace }}/packages/test-harness/src/config/empty.lua
# - run: dir /home/runner/.local/share/ || true
# - run: dir /home/runner/.local/share/nvim/ || true
# - run: dir /home/runner/.config/ || true
# - run: dir /home/runner/.config/nvim/ || true
#- run: dir C:\Users\runneradmin\
#- run: dir C:\Users\runneradmin\nvim-${{ matrix.app_version }}\bin\
# Run dir C:\Users\runneradmin\nvim-v0.9.5\bin\
# Directory: C:\Users\runneradmin\nvim-v0.9.5\bin
# Mode LastWriteTime Length Name
# ---- ------------- ------ ----
# d---- 12/30/2023 1:22 PM bearer
# d---- 12/30/2023 1:22 PM iconengines
# d---- 12/30/2023 1:22 PM imageformats
# d---- 12/30/2023 1:22 PM platforms
# d---- 12/30/2023 1:22 PM styles
# d---- 12/30/2023 1:22 PM translations
# -a--- 12/30/2023 1:20 PM 16384 cat.exe
# -a--- 12/30/2023 1:20 PM 4173928 D3Dcompiler_47.dll
# -a--- 12/30/2023 1:22 PM 1199296 dbghelp.dll
# -a--- 12/30/2023 1:20 PM 68096 diff.exe
# -a--- 12/30/2023 1:20 PM 69088 libEGL.dll
# -a--- 12/30/2023 1:20 PM 76288 libgcc_s_seh-1.dll
# -a--- 12/30/2023 1:20 PM 6298808 libGLESv2.dll
# -a--- 12/30/2023 1:20 PM 1417216 libstdc++-6.dll
# -a--- 12/30/2023 1:20 PM 52224 libwinpthread-1.dll
# -a--- 12/30/2023 1:22 PM 539648 lua51.dll
# -a--- 12/30/2023 1:20 PM 3757746 nvim-qt.exe
# -a--- 12/30/2023 1:22 PM 5214720 nvim.exe
# -a--- 12/30/2023 1:22 PM 13242368 nvim.pdb
# -a--- 12/30/2023 1:20 PM 20923392 opengl32sw.dll
# -a--- 12/30/2023 1:20 PM 8185968 Qt5Core.dll
# -a--- 12/30/2023 1:20 PM 9663232 Qt5Gui.dll
# -a--- 12/30/2023 1:20 PM 2699096 Qt5Network.dll
# -a--- 12/30/2023 1:20 PM 580088 Qt5Svg.dll
# -a--- 12/30/2023 1:20 PM 8662160 Qt5Widgets.dll
# -a--- 12/30/2023 1:20 PM 131072 tee.exe
# -a--- 12/30/2023 1:20 PM 1137152 win32yank.exe
# -a--- 12/30/2023 1:20 PM 151040
- name: Run neovim unit tests using test-harness
run: pnpm -F @cursorless/test-harness testNeovim
if: runner.os != 'Linux'
env:
APP_PATH: ${{ steps.vim.outputs.executable }}
- run: xvfb-run -a pnpm -F @cursorless/test-harness testNeovim
if: runner.os == 'Linux'
env:
APP_PATH: ${{ steps.vim.outputs.executable }}
#- name: Create vscode dist that can be installed locally
# run: pnpm -F @cursorless/cursorless-vscode populate-dist --local-install
# if: runner.os == 'Linux' && matrix.app_version == 'stable'
# XXX: restore this once neovim tests work in CI
# - name: Test create vsix
# id: createVsix
# uses: HaaLeo/publish-vscode-extension@v1
# with:
# pat: none
# packagePath: packages/cursorless-vscode/dist
# dryRun: true
# - run: mv ${{ steps.createVsix.outputs.vsixPath }} cursorless-development.vsix
# if: runner.os == 'Linux' && matrix.app_version == 'stable'
# - name: Upload vsix
# uses: actions/upload-artifact@v4
# if: runner.os == 'Linux' && matrix.app_version == 'stable'
# with:
# name: vsix
# path: cursorless-development.vsix
- name: Archive logs
uses: actions/upload-artifact@v4
with:
name: logs
path: ${{ env.APP_LOGS_DIR }}
if: failure()
- name: Archive dumps
uses: actions/upload-artifact@v4
with:
name: dumps
path: ${{ env.APP_CRASH_DIR }}
if: failure()