Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 52 additions & 15 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,40 @@ jobs:
environment: production
env:
CURSORLESS_REPO_ROOT: ${{ github.workspace }}

steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- run: corepack enable
- uses: actions/setup-node@v4

- name: Enable Corepack
run: corepack enable

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
- run: pnpm --color install
- run: pnpm --color compile
- run: pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build

- name: Install dependencies
run: pnpm --color install

- name: Compile
run: pnpm --color compile

- name: Build
run: pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build
env:
Comment on lines +39 to 40
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#2391

It makes sense to run compile separately if we think it's faster / higher signal/ROI to read. There's some question about whether build would do everything necessary if compile was skipped, which is a bit concerning, but we did not test this.

CURSORLESS_DEPLOY: true

- name: Publish to Open VSX Registry
id: publishToOpenVSX
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
packagePath: packages/cursorless-vscode/dist

- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
Expand All @@ -47,36 +61,53 @@ jobs:
env:
CURSORLESS_REPO_ROOT: ${{ github.workspace }}
STAGING_DIRECTORY: ${{ github.workspace }}/cursorless.nvim-staging

steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
- name: Checkout repository
uses: actions/checkout@v4

- name: Enable Corepack
run: corepack enable

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
- run: pnpm --color install
- run: pnpm --color compile
- run: pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build

- name: Install dependencies
run: pnpm --color install

- name: Compile
run: pnpm --color compile

- name: Build
run: pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build
env:
CURSORLESS_DEPLOY: true
- uses: actions/checkout@v4

- name: Checkout cursorless.nvim plugin repo
uses: actions/checkout@v4
with:
token: ${{ secrets.CURSORLESS_BOT_TOKEN }}
repository: hands-free-vim/cursorless.nvim
path: ${{ env.STAGING_DIRECTORY }}

- name: Configure GPG Key
working-directory: ${{ env.STAGING_DIRECTORY }}
run: |
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import
env:
GPG_SIGNING_KEY: ${{ secrets.CURSORLESS_BOT_GPG_SIGNING_KEY }}

- name: git config
working-directory: ${{ env.STAGING_DIRECTORY }}
run: |
git config user.name cursorless-bot
git config user.email [email protected]
git config user.signingkey A9387720AFC62221
git config commit.gpgsign true

- name: Push compiled files to cursorless.nvim plugin repo
run: bash -x scripts/deploy-cursorless-nvim.sh ${{ env.STAGING_DIRECTORY }}

Expand All @@ -85,20 +116,26 @@ jobs:
runs-on: ubuntu-latest
needs: publish-extension
environment: production

steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.CURSORLESS_BOT_TOKEN }}

- name: Configure GPG Key
run: |
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import
env:
GPG_SIGNING_KEY: ${{ secrets.CURSORLESS_BOT_GPG_SIGNING_KEY }}

- name: git config
run: |
git config user.name cursorless-bot
git config user.email [email protected]
git config user.signingkey A9387720AFC62221
git config commit.gpgsign true
- run: bash -x scripts/deploy-cursorless-talon.sh

- name: Push cursorless-talon subrepo
run: bash -x scripts/deploy-cursorless-talon.sh
5 changes: 4 additions & 1 deletion .github/workflows/forbid-todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ on:
jobs:
forbid-todo:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

- name: Forbid TODO
run: ./scripts/forbid-todo.sh
37 changes: 28 additions & 9 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Pre-commit
permissions: read-all

on:
push:
branches:
Expand All @@ -16,19 +17,37 @@ jobs:
runs-on: ubuntu-latest
env:
CURSORLESS_REPO_ROOT: ${{ github.workspace }}

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: 3.x
- run: corepack enable
- uses: actions/setup-node@v4

- name: Enable Corepack
run: corepack enable

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
- run: pnpm --color install
- uses: leafo/gh-actions-lua@v9
- uses: leafo/gh-actions-luarocks@v4
- uses: pre-commit/[email protected]
- uses: pre-commit-ci/[email protected]

- name: Install dependencies
run: pnpm --color install

- name: Install lua
uses: leafo/gh-actions-lua@v9

- name: Install luarocks
uses: leafo/gh-actions-luarocks@v4

- name: Run pre-commit hooks
uses: pre-commit/[email protected]

- name: Auto-fix pre-commit issues
uses: pre-commit-ci/[email protected]
Comment on lines +48 to +52
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open questions: why do we run both the lite sweet and the normal one? Why if: always()?

For the former guessing that the normal suite doesn't automatically correct issues but we have some tests that can't run in it.

if: always()
16 changes: 12 additions & 4 deletions .github/workflows/test-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,19 @@ jobs:
runs-on: ubuntu-latest
env:
CURSORLESS_REPO_ROOT: ${{ github.workspace }}

steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
- name: Checkout repository
uses: actions/checkout@v4

- name: Enable Corepack
run: corepack enable

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
- run: bash -x scripts/build-and-assemble-website.sh

- name: Build website
run: bash -x scripts/build-and-assemble-website.sh
85 changes: 65 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Run Tests
permissions: read-all

on:
push:
branches:
Expand All @@ -22,6 +23,7 @@ jobs:
- os: ubuntu-latest
app_version: legacy
runs-on: ${{ matrix.os }}

env:
APP_VERSION: ${{ matrix.app_version }}
# FIXME: https://github.com/cursorless-dev/cursorless/issues/2793
Expand All @@ -32,69 +34,112 @@ jobs:
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
- name: Checkout repository
uses: actions/checkout@v4

- name: Enable Corepack
run: corepack enable

- name: Set up Node.js
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 }}"

- name: Creating log directories
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

- name: Install dependencies
run: pnpm --color install

- name: Compile
run: pnpm --color compile

- name: Build
run: pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build

- name: Run tests (Linux)
run: xvfb-run -a pnpm --color test
if: runner.os == 'Linux'
- run: pnpm --color test

- name: Run tests (Other)
run: pnpm --color test
if: runner.os != 'Linux'
- run: xvfb-run -a pnpm -F @cursorless/test-harness test:talonJs

- name: Run Talon-JS tests (Linux)
run: xvfb-run -a pnpm -F @cursorless/test-harness test:talonJs
if: runner.os == 'Linux' && matrix.app_version == 'stable'
- run: pnpm -F @cursorless/test-harness test:talonJs

- name: Run Talon-JS tests (Other)
run: pnpm -F @cursorless/test-harness test:talonJs
if: runner.os != 'Linux' && matrix.app_version == 'stable'
- run: xvfb-run -a pnpm -F @cursorless/cursorless-everywhere-talon-e2e test:quickjs

- name: Run Cursorless-everywhere-talon tests (Linux)
run: xvfb-run -a pnpm -F @cursorless/cursorless-everywhere-talon-e2e test:quickjs
if: runner.os == 'Linux' && matrix.app_version == 'stable'
- run: pnpm -F @cursorless/cursorless-everywhere-talon-e2e test:quickjs

- name: Run Cursorless-everywhere-talon tests (Other)
run: pnpm -F @cursorless/cursorless-everywhere-talon-e2e test:quickjs
if: runner.os != 'Linux' && matrix.app_version == 'stable'
- run: bash -x scripts/install-neovim-dependencies.sh
- uses: rhysd/action-setup-vim@v1

- name: Install neovim dependencies
run: bash -x scripts/install-neovim-dependencies.sh

- name: Setup neovim (Linux)
uses: rhysd/action-setup-vim@v1
id: vim
if: runner.os == 'Linux' && matrix.app_version == 'stable'
with:
version: ${{ env.NEOVIM_VERSION }}
neovim: true
- name: Run neovim tests

- name: Run neovim tests (Linux)
run: xvfb-run -a pnpm -F @cursorless/test-harness test:neovim
if: runner.os == 'Linux'
if: runner.os == 'Linux' && matrix.app_version == 'stable'
env:
NEOVIM_PATH: ${{ steps.vim.outputs.executable }}
- uses: ./.github/actions/test-neovim-lua/

- name: Run neovim lua tests (Linux)
uses: ./.github/actions/test-neovim-lua/
if: runner.os == 'Linux' && matrix.app_version == 'stable'
- uses: ./.github/actions/lint-lua-ls/

- name: Run neovim lua lint (Linux)
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

- name: Rename vsix
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:
Expand Down
Loading