Neovim CI tests #10171
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: | |
# os: [macos-latest, ubuntu-latest, windows-latest] | |
os: [ubuntu-latest] | |
# app_version: [stable] | |
app_version: [v0.10.0] | |
# include: | |
# - os: ubuntu-latest | |
# # app_version: v0.9.5 | |
# app_version: legacy | |
runs-on: ${{ matrix.os }} | |
env: | |
APP_VERSION: ${{ matrix.app_version }} | |
VSCODE_CRASH_DIR: ${{ github.workspace }}/artifacts/dumps | |
VSCODE_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: | |
# node-version-file: .nvmrc | |
node-version: v18.20.2 | |
cache: pnpm | |
- run: mkdir -p "${{ env.VSCODE_CRASH_DIR }}" "${{ env.VSCODE_LOGS_DIR }}" | |
shell: bash | |
- run: pnpm --color install | |
- run: pnpm --color compile | |
- run: pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build | |
# XXX - restore this once neovim tests work in CI | |
#- run: xvfb-run -a pnpm --color test | |
# if: runner.os == 'Linux' | |
# - run: pnpm --color test | |
# if: runner.os != 'Linux' | |
# XXX - debugging only, remove once tests work on all platforms | |
- 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' | |
- name: Install cursorless.nvim dependencies | |
run: npm install -g [email protected] | |
- run: bash -x scripts/install-neovim-dependencies.sh | |
# XXX - is there a better way to execute all these commands? | |
# put them into a install-neovim-dependencies.sh script and rely on the HOME env variable | |
# - 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/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' | |
- name: Install Neovim | |
uses: rhysd/action-setup-vim@v1 | |
id: vim | |
with: | |
version: ${{ matrix.app_version }} | |
neovim: true | |
- 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 }} | |
# XXX: restore this once neovim tests work in CI | |
# - 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' | |
# - 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.VSCODE_LOGS_DIR }} | |
if: failure() | |
- name: Archive dumps | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dumps | |
path: ${{ env.VSCODE_CRASH_DIR }} | |
if: failure() |