-
-
Notifications
You must be signed in to change notification settings - Fork 85
203 lines (201 loc) · 10.3 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
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]
# 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)
app_version: [stable]
# app_version: [v0.9.5]
# 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
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
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/test-harness@0.1.0 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/test-harness@0.1.0 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
# XXX: commenting for now because we added already built cursorless.nvim in this branch to speed things up in CI
# XXX - if we don't run this, we might have to create packages\cursorless-neovim\out folder so the logs can be written
- run: pnpm --color compile
#- run: dir D:\a\cursorless\cursorless\packages\cursorless-neovim\
#- run: dir D:\a\cursorless\cursorless\packages\cursorless-neovim\out\
# XXX: restore this once neovim tests work in CI
# - 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'
# XXX: delete this because it doesn't work
# - name: Checkout themis.vim
# uses: actions/checkout@v4
# with:
# repository: thinca/vim-themis
# path: vim-themis
# Windows: D:\a\cursorless\cursorless
# Linux: /home/runner/work/cursorless/cursorless
- run: pwd
- 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 neovim@5.1.0
#- run: git clone https://github.com/vim-scripts/BufOnly.vim C:\Users\runneradmin\BufOnly.vim
#- run: git clone https://github.com/hands-free-vim/talon.nvim C:\Users\runneradmin\talon.nvim
- run: git clone https://github.com/vim-scripts/BufOnly.vim /home/runner/BufOnly.vim
- run: git clone https://github.com/hands-free-vim/talon.nvim /home/runner/talon.nvim
# - 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
- 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()