Skip to content

Collection item scope provider #12039

Collection item scope provider

Collection item scope provider #12039

Workflow file for this run

name: Run Tests
permissions: read-all
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
merge_group:
branches: [main]
workflow_dispatch:
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
app_version: [stable]
include:
- os: ubuntu-latest
app_version: legacy
runs-on: ${{ matrix.os }}
env:
APP_VERSION: ${{ matrix.app_version }}
NEOVIM_VERSION: ${{ matrix.app_version == 'stable' && 'stable' || 'v0.10.0' }}
VSCODE_CRASH_DIR: ${{ github.workspace }}/artifacts/dumps
VSCODE_LOGS_DIR: ${{ github.workspace }}/artifacts/logs
CURSORLESS_REPO_ROOT: ${{ github.workspace }}
TEMP_DIR: ${{ github.workspace }}/temp
NODE_OPTIONS: "--max-old-space-size=4096"
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
- run: mkdir -p "${{ env.VSCODE_CRASH_DIR }}" "${{ env.VSCODE_LOGS_DIR }}" "${{ env.TEMP_DIR }}"
shell: bash
- run: pnpm --color install
- run: pnpm --color compile
- 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'
- run: xvfb-run -a pnpm -F @cursorless/test-harness test:talonJs
if: runner.os == 'Linux' && matrix.vscode_version == 'stable'
- run: pnpm -F @cursorless/test-harness test:talonJs
if: runner.os != 'Linux' && matrix.vscode_version == 'stable'
- run: xvfb-run -a pnpm -F @cursorless/cursorless-everywhere-talon-e2e test:quickjs
if: runner.os == 'Linux' && matrix.vscode_version == 'stable'
- run: pnpm -F @cursorless/cursorless-everywhere-talon-e2e test:quickjs
if: runner.os != 'Linux' && matrix.vscode_version == 'stable'
- run: bash -x scripts/install-neovim-dependencies.sh
- uses: rhysd/action-setup-vim@v1
id: vim
with:
version: ${{ env.NEOVIM_VERSION }}
neovim: true
- name: Run neovim tests
run: xvfb-run -a pnpm -F @cursorless/test-harness test:neovim
if: runner.os == 'Linux'
env:
NEOVIM_PATH: ${{ steps.vim.outputs.executable }}
- uses: ./.github/actions/test-neovim-lua/
if: runner.os == 'Linux' && matrix.app_version == 'stable'
- uses: ./.github/actions/lint-lua-ls/
if: runner.os == 'Linux' && matrix.app_version == 'stable'
- 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()