7
7
pull_request :
8
8
branches :
9
9
- main
10
+ merge_group :
11
+ branches :
12
+ - main
10
13
11
14
permissions :
12
15
contents : read
22
25
runs-on : ubuntu-latest
23
26
steps :
24
27
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25
- - uses : actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
28
+ - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
29
+ - uses : dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
26
30
- uses : ./.github/actions/setup-go
27
31
with :
28
32
cache-name : build
35
39
runs-on : ubuntu-latest
36
40
steps :
37
41
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
38
- - uses : actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
42
+ - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
43
+ - uses : dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
39
44
40
45
- run : npm ci
41
46
@@ -45,51 +50,58 @@ jobs:
45
50
strategy :
46
51
fail-fast : false
47
52
matrix :
48
- include :
53
+ config :
49
54
- os : ubuntu-latest
50
55
coverage : true
51
56
- os : windows-latest
52
57
coverage : true
58
+ skip : ${{ github.event_name == 'merge_group' }}
53
59
- os : macos-latest
54
60
coverage : true
61
+ skip : ${{ github.event_name == 'merge_group' }}
55
62
- os : ubuntu-latest
56
63
name : ' no submodules'
57
64
no-submodules : true
58
65
- os : ['self-hosted', '1ES.Pool=TypeScript-1ES-GitHub-XL', '1ES.ImageOverride=mariner-2.0']
59
66
name : ' race mode'
60
67
race : true
68
+ skip : ${{ github.event_name == 'merge_group' }}
61
69
- os : ubuntu-latest
62
70
name : ' noembed'
63
71
noembed : true
64
72
- os : ubuntu-latest
65
73
name : ' concurrent test programs'
66
74
concurrent-test-programs : true
67
75
coverage : true
76
+ exclude :
77
+ - config :
78
+ skip : true
68
79
69
- name : test (${{ matrix.name || matrix.os }})
80
+ name : test (${{ matrix.config. name || matrix.config .os }})
70
81
71
- runs-on : ${{ matrix.os }}
82
+ runs-on : ${{ matrix.config. os }}
72
83
73
84
permissions :
74
85
id-token : write
75
86
contents : read
76
87
77
88
env :
78
- TSGO_HEREBY_RACE : ${{ (matrix.race && 'true') || 'false' }}
79
- TSGO_HEREBY_NOEMBED : ${{ (matrix.noembed && 'true') || 'false' }}
80
- TSGO_HEREBY_CONCURRENT_TEST_PROGRAMS : ${{ (matrix.concurrent-test-programs && 'true') || 'false' }}
81
- TSGO_HEREBY_COVERAGE : ${{ (matrix.coverage && 'true') || 'false' }}
89
+ TSGO_HEREBY_RACE : ${{ (matrix.config. race && 'true') || 'false' }}
90
+ TSGO_HEREBY_NOEMBED : ${{ (matrix.config. noembed && 'true') || 'false' }}
91
+ TSGO_HEREBY_CONCURRENT_TEST_PROGRAMS : ${{ (matrix.config. concurrent-test-programs && 'true') || 'false' }}
92
+ TSGO_HEREBY_COVERAGE : ${{ (matrix.config. coverage && 'true') || 'false' }}
82
93
83
94
steps :
84
95
- run : git config --system core.longpaths true
85
- if : ${{ matrix.os == 'windows-latest' }}
96
+ if : ${{ matrix.config. os == 'windows-latest' }}
86
97
87
98
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
88
99
with :
89
- submodules : ${{ !matrix.no-submodules }}
90
- - uses : actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3 .0
100
+ submodules : ${{ !matrix.config. no-submodules }}
101
+ - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4 .0
91
102
with :
92
103
node-version : ' lts/*'
104
+ - uses : dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
93
105
- uses : ./.github/actions/setup-go
94
106
with :
95
107
cache-name : test
@@ -99,19 +111,28 @@ jobs:
99
111
- run : go install gotest.tools/gotestsum@latest
100
112
# Installing gotestsum is super slow on Windows.
101
113
# Also, avoid using it in race mode so we get the full output.
102
- if : ${{ matrix.os != 'windows-latest' && !matrix.race }}
114
+ if : ${{ matrix.config. os != 'windows-latest' && !matrix.config .race }}
103
115
104
116
- name : Tests
105
117
id : test
106
- run : npx hereby test:all
118
+ run : npx hereby test
119
+
120
+ - name : Benchmarks
121
+ run : npx hereby test:benchmarks
122
+
123
+ - name : Tools Tests
124
+ run : npx hereby test:tools
125
+
126
+ - name : API Tests
127
+ run : npx hereby test:api
107
128
108
129
- run : git add .
109
130
110
- - uses : codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
111
- if : ${{ always() && matrix.coverage }}
131
+ - uses : codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
132
+ if : ${{ always() && matrix.config. coverage && github.event_name != 'merge_group' }}
112
133
with :
113
- use_oidc : true
114
- name : ${{ matrix.name || matrix.os }}
134
+ use_oidc : ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }}
135
+ name : ${{ matrix.config. name || matrix.config .os }}
115
136
directory : ./coverage
116
137
117
138
- run : git diff --staged --exit-code --stat
@@ -125,34 +146,41 @@ jobs:
125
146
- uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
126
147
if : ${{ failure() && steps.test.conclusion == 'failure' }}
127
148
with :
128
- name : ${{ matrix.os }}-${{ (matrix.race && 'race') || 'norace' }}-new-baselines-artifact
149
+ name : ${{ matrix.config. os }}-${{ (matrix.config .race && 'race') || 'norace' }}-new-baselines-artifact
129
150
path : testdata/baselines/local
130
151
131
152
lint :
132
153
strategy :
133
154
fail-fast : false
134
155
matrix :
135
- include :
156
+ config :
136
157
- os : ubuntu-latest
137
158
- os : windows-latest
159
+ skip : ${{ github.event_name == 'merge_group' }}
138
160
- os : macos-latest
161
+ skip : ${{ github.event_name == 'merge_group' }}
139
162
- os : ubuntu-latest
140
163
name : ' noembed'
141
164
noembed : true
165
+ skip : ${{ github.event_name == 'merge_group' }}
166
+ exclude :
167
+ - config :
168
+ skip : true
142
169
143
- name : lint (${{ matrix.name || matrix.os }})
170
+ name : lint (${{ matrix.config. name || matrix.config .os }})
144
171
145
- runs-on : ${{ matrix.os }}
172
+ runs-on : ${{ matrix.config. os }}
146
173
147
174
env :
148
- TSGO_HEREBY_NOEMBED : ${{ (matrix.noembed && 'true') || 'false' }}
175
+ TSGO_HEREBY_NOEMBED : ${{ (matrix.config. noembed && 'true') || 'false' }}
149
176
150
177
steps :
151
178
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
152
- - uses : actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
179
+ - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
180
+ - uses : dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
153
181
- uses : ./.github/actions/setup-go
154
182
with :
155
- cache-name : lint${{ (matrix.noembed && '-noembed') || ''}}
183
+ cache-name : lint${{ (matrix.config. noembed && '-noembed') || ''}}
156
184
157
185
- run : npm ci
158
186
@@ -162,14 +190,14 @@ jobs:
162
190
runs-on : ubuntu-latest
163
191
steps :
164
192
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
165
- - uses : actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
193
+ - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
194
+ - uses : dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
166
195
- uses : ./.github/actions/setup-go
167
196
with :
168
197
cache-name : format
169
198
170
199
- run : npm ci
171
200
172
- - run : npx hereby install-tools
173
201
- run : npx hereby check:format
174
202
175
203
generate :
@@ -178,7 +206,8 @@ jobs:
178
206
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
179
207
with :
180
208
submodules : true
181
- - uses : actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
209
+ - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
210
+ - uses : dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
182
211
- uses : ./.github/actions/setup-go
183
212
with :
184
213
cache-name : generate
@@ -187,6 +216,9 @@ jobs:
187
216
188
217
- run : npx hereby generate
189
218
219
+ - run : node ./internal/lsp/lsproto/_generate/fetchModel.mjs
220
+ - run : node ./internal/lsp/lsproto/_generate/generate.mjs
221
+
190
222
- run : git add .
191
223
- run : git diff --staged --exit-code --stat
192
224
@@ -207,7 +239,8 @@ jobs:
207
239
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
208
240
with :
209
241
submodules : true
210
- - uses : actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
242
+ - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
243
+ - uses : dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
211
244
- uses : ./.github/actions/setup-go
212
245
with :
213
246
cache-name : smoke
@@ -238,7 +271,8 @@ jobs:
238
271
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
239
272
with :
240
273
submodules : true
241
- - uses : actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
274
+ - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
275
+ - uses : dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
242
276
- uses : ./.github/actions/setup-go
243
277
with :
244
278
cache-name : baselines
@@ -288,17 +322,20 @@ jobs:
288
322
runs-on : ubuntu-latest
289
323
if : ${{ always() }}
290
324
needs :
325
+ - baselines
291
326
- build
292
- - test
293
- - lint
327
+ - extension
294
328
- format
295
329
- generate
296
- - tidy
330
+ - lint
331
+ - misc
297
332
- smoke
333
+ - test
334
+ - tidy
298
335
299
336
steps :
300
337
- name : Check required jobs
301
338
env :
302
339
NEEDS : ${{ toJson(needs) }}
303
340
run : |
304
- ! echo $NEEDS | jq -e 'to_entries[] | { job: .key, result: .value.result } | select(.result != "success")'
341
+ ! echo $NEEDS | jq -e 'to_entries[] | { job: .key, result: .value.result } | select(( .result == "success" or .result == "skipped") | not )'
0 commit comments