Neovim CI tests #10003
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | |
# 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/[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 | |
# XXX: commenting for now because we added already built cursorless.nvim in this branch to speed things up in CI | |
# - run: pnpm --color compile | |
# 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 | |
# testing - D:\a\cursorless\cursorless (to remove) | |
- run: pwd | |
- 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 C:\Users\runneradmin\BufOnly.vim | |
- run: git clone https://github.com/hands-free-vim/talon.nvim C:\Users\runneradmin\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 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 xxd.exe | |
# XXX: delete this because it doesn't work | |
# - name: Run neovim unit tests using themis.vim | |
# env: | |
# THEMIS_VIM: ${{ steps.vim.outputs.executable }} | |
# # PROFILE_LOG: profile.txt | |
# run: | | |
# echo "${THEMIS_VIM}" | |
# ./vim-themis/bin/themis ./test/all.vimspec | |
- 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 }} | |
- name: Save snapshots | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
save-only: true | |
path: .artifacts/visual-snapshots | |
# XXX: enable this once neovim tests work in CI for Windows | |
# - run: xvfb-run -a pnpm -F @cursorless/test-harness testNeovim | |
# if: runner.os == 'Linux' | |
- 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() |