1
1
name : Run Tests
2
2
permissions : read-all
3
+
3
4
on :
4
5
push :
5
6
branches :
22
23
- os : ubuntu-latest
23
24
app_version : legacy
24
25
runs-on : ${{ matrix.os }}
26
+
25
27
env :
26
28
APP_VERSION : ${{ matrix.app_version }}
27
29
NEOVIM_VERSION : ${{ matrix.app_version == 'stable' && 'stable' || 'v0.10.0' }}
@@ -30,69 +32,112 @@ jobs:
30
32
CURSORLESS_REPO_ROOT : ${{ github.workspace }}
31
33
TEMP_DIR : ${{ github.workspace }}/temp
32
34
NODE_OPTIONS : " --max-old-space-size=4096"
35
+
33
36
steps :
34
- - uses : actions/checkout@v4
35
- - run : corepack enable
36
- - uses : actions/setup-node@v4
37
+ - name : Checkout repository
38
+ uses : actions/checkout@v4
39
+
40
+ - name : Enable Corepack
41
+ run : corepack enable
42
+
43
+ - name : Set up Node.js
44
+ uses : actions/setup-node@v4
37
45
with :
38
46
node-version-file : .nvmrc
39
47
cache : pnpm
40
- - run : mkdir -p "${{ env.VSCODE_CRASH_DIR }}" "${{ env.VSCODE_LOGS_DIR }}" "${{ env.TEMP_DIR }}"
48
+
49
+ - name : Creating log directories
50
+ run : mkdir -p "${{ env.VSCODE_CRASH_DIR }}" "${{ env.VSCODE_LOGS_DIR }}" "${{ env.TEMP_DIR }}"
41
51
shell : bash
42
- - run : pnpm --color install
43
- - run : pnpm --color compile
44
- - run : pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build
45
- - run : xvfb-run -a pnpm --color test
52
+
53
+ - name : Install dependencies
54
+ run : pnpm --color install
55
+
56
+ - name : Compile
57
+ run : pnpm --color compile
58
+
59
+ - name : Build
60
+ run : pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build
61
+
62
+ - name : Run tests (Linux)
63
+ run : xvfb-run -a pnpm --color test
46
64
if : runner.os == 'Linux'
47
- - run : pnpm --color test
65
+
66
+ - name : Run tests (Other)
67
+ run : pnpm --color test
48
68
if : runner.os != 'Linux'
49
- - run : xvfb-run -a pnpm -F @cursorless/test-harness test:talonJs
69
+
70
+ - name : Run Talon-JS tests (Linux)
71
+ run : xvfb-run -a pnpm -F @cursorless/test-harness test:talonJs
50
72
if : runner.os == 'Linux' && matrix.app_version == 'stable'
51
- - run : pnpm -F @cursorless/test-harness test:talonJs
73
+
74
+ - name : Run Talon-JS tests (Other)
75
+ run : pnpm -F @cursorless/test-harness test:talonJs
52
76
if : runner.os != 'Linux' && matrix.app_version == 'stable'
53
- - run : xvfb-run -a pnpm -F @cursorless/cursorless-everywhere-talon-e2e test:quickjs
77
+
78
+ - name : Run Cursorless-everywhere-talon tests (Linux)
79
+ run : xvfb-run -a pnpm -F @cursorless/cursorless-everywhere-talon-e2e test:quickjs
54
80
if : runner.os == 'Linux' && matrix.app_version == 'stable'
55
- - run : pnpm -F @cursorless/cursorless-everywhere-talon-e2e test:quickjs
81
+
82
+ - name : Run Cursorless-everywhere-talon tests (Other)
83
+ run : pnpm -F @cursorless/cursorless-everywhere-talon-e2e test:quickjs
56
84
if : runner.os != 'Linux' && matrix.app_version == 'stable'
57
- - run : bash -x scripts/install-neovim-dependencies.sh
58
- - uses : rhysd/action-setup-vim@v1
85
+
86
+ - name : Install neovim dependencies
87
+ run : bash -x scripts/install-neovim-dependencies.sh
88
+
89
+ - name : Setup neovim (Linux)
90
+ uses : rhysd/action-setup-vim@v1
59
91
id : vim
92
+ if : runner.os == 'Linux' && matrix.app_version == 'stable'
60
93
with :
61
94
version : ${{ env.NEOVIM_VERSION }}
62
95
neovim : true
63
- - name : Run neovim tests
96
+
97
+ - name : Run neovim tests (Linux)
64
98
run : xvfb-run -a pnpm -F @cursorless/test-harness test:neovim
65
- if : runner.os == 'Linux'
99
+ if : runner.os == 'Linux' && matrix.app_version == 'stable'
66
100
env :
67
101
NEOVIM_PATH : ${{ steps.vim.outputs.executable }}
68
- - uses : ./.github/actions/test-neovim-lua/
102
+
103
+ - name : Run neovim lua tests (Linux)
104
+ uses : ./.github/actions/test-neovim-lua/
69
105
if : runner.os == 'Linux' && matrix.app_version == 'stable'
70
- - uses : ./.github/actions/lint-lua-ls/
106
+
107
+ - name : Run neovim lua lint (Linux)
108
+ uses : ./.github/actions/lint-lua-ls/
71
109
if : runner.os == 'Linux' && matrix.app_version == 'stable'
110
+
72
111
- name : Create vscode dist that can be installed locally
73
112
run : pnpm -F @cursorless/cursorless-vscode populate-dist --local-install
74
113
if : runner.os == 'Linux' && matrix.app_version == 'stable'
114
+
75
115
- name : Test create vsix
76
116
id : createVsix
77
117
uses : HaaLeo/publish-vscode-extension@v1
78
118
with :
79
119
pat : none
80
120
packagePath : packages/cursorless-vscode/dist
81
121
dryRun : true
82
- - run : mv ${{ steps.createVsix.outputs.vsixPath }} cursorless-development.vsix
122
+
123
+ - name : Rename vsix
124
+ run : mv ${{ steps.createVsix.outputs.vsixPath }} cursorless-development.vsix
83
125
if : runner.os == 'Linux' && matrix.app_version == 'stable'
126
+
84
127
- name : Upload vsix
85
128
uses : actions/upload-artifact@v4
86
129
if : runner.os == 'Linux' && matrix.app_version == 'stable'
87
130
with :
88
131
name : vsix
89
132
path : cursorless-development.vsix
133
+
90
134
- name : Archive logs
91
135
uses : actions/upload-artifact@v4
92
136
with :
93
137
name : logs
94
138
path : ${{ env.VSCODE_LOGS_DIR }}
95
139
if : failure()
140
+
96
141
- name : Archive dumps
97
142
uses : actions/upload-artifact@v4
98
143
with :
0 commit comments