-
-
Notifications
You must be signed in to change notification settings - Fork 85
146 lines (119 loc) · 4.5 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
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:
- 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
- name: Creating log directories
run: mkdir -p "${{ env.VSCODE_CRASH_DIR }}" "${{ env.VSCODE_LOGS_DIR }}" "${{ env.TEMP_DIR }}"
shell: bash
- 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'
- name: Run tests (Other)
run: pnpm --color test
if: runner.os != 'Linux'
- 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'
- name: Run Talon-JS tests (Other)
run: pnpm -F @cursorless/test-harness test:talonJs
if: runner.os != 'Linux' && matrix.app_version == 'stable'
- 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'
- 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'
- 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 (Linux)
run: xvfb-run -a pnpm -F @cursorless/test-harness test:neovim
if: runner.os == 'Linux' && matrix.app_version == 'stable'
env:
NEOVIM_PATH: ${{ steps.vim.outputs.executable }}
- name: Run neovim lua tests (Linux)
uses: ./.github/actions/test-neovim-lua/
if: runner.os == 'Linux' && matrix.app_version == 'stable'
- 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
- 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:
name: dumps
path: ${{ env.VSCODE_CRASH_DIR }}
if: failure()