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
@@ -47,48 +50,54 @@ jobs:
47
50
strategy :
48
51
fail-fast : false
49
52
matrix :
50
- include :
53
+ config :
51
54
- os : ubuntu-latest
52
55
coverage : true
53
56
- os : windows-latest
54
57
coverage : true
58
+ skip : ${{ github.event_name == 'merge_group' }}
55
59
- os : macos-latest
56
60
coverage : true
61
+ skip : ${{ github.event_name == 'merge_group' }}
57
62
- os : ubuntu-latest
58
63
name : ' no submodules'
59
64
no-submodules : true
60
65
- os : ['self-hosted', '1ES.Pool=TypeScript-1ES-GitHub-XL', '1ES.ImageOverride=mariner-2.0']
61
66
name : ' race mode'
62
67
race : true
68
+ skip : ${{ github.event_name == 'merge_group' }}
63
69
- os : ubuntu-latest
64
70
name : ' noembed'
65
71
noembed : true
66
72
- os : ubuntu-latest
67
73
name : ' concurrent test programs'
68
74
concurrent-test-programs : true
69
75
coverage : true
76
+ exclude :
77
+ - config :
78
+ skip : true
70
79
71
- name : test (${{ matrix.name || matrix.os }})
80
+ name : test (${{ matrix.config. name || matrix.config .os }})
72
81
73
- runs-on : ${{ matrix.os }}
82
+ runs-on : ${{ matrix.config. os }}
74
83
75
84
permissions :
76
85
id-token : write
77
86
contents : read
78
87
79
88
env :
80
- TSGO_HEREBY_RACE : ${{ (matrix.race && 'true') || 'false' }}
81
- TSGO_HEREBY_NOEMBED : ${{ (matrix.noembed && 'true') || 'false' }}
82
- TSGO_HEREBY_CONCURRENT_TEST_PROGRAMS : ${{ (matrix.concurrent-test-programs && 'true') || 'false' }}
83
- 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' }}
84
93
85
94
steps :
86
95
- run : git config --system core.longpaths true
87
- if : ${{ matrix.os == 'windows-latest' }}
96
+ if : ${{ matrix.config. os == 'windows-latest' }}
88
97
89
98
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
90
99
with :
91
- submodules : ${{ !matrix.no-submodules }}
100
+ submodules : ${{ !matrix.config. no-submodules }}
92
101
- uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
93
102
with :
94
103
node-version : ' lts/*'
@@ -102,7 +111,7 @@ jobs:
102
111
- run : go install gotest.tools/gotestsum@latest
103
112
# Installing gotestsum is super slow on Windows.
104
113
# Also, avoid using it in race mode so we get the full output.
105
- if : ${{ matrix.os != 'windows-latest' && !matrix.race }}
114
+ if : ${{ matrix.config. os != 'windows-latest' && !matrix.config .race }}
106
115
107
116
- name : Tests
108
117
id : test
@@ -120,10 +129,10 @@ jobs:
120
129
- run : git add .
121
130
122
131
- uses : codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
123
- if : ${{ always() && matrix.coverage }}
132
+ if : ${{ always() && matrix.config. coverage && github.event_name != 'merge_group' }}
124
133
with :
125
134
use_oidc : true
126
- name : ${{ matrix.name || matrix.os }}
135
+ name : ${{ matrix.config. name || matrix.config .os }}
127
136
directory : ./coverage
128
137
129
138
- run : git diff --staged --exit-code --stat
@@ -137,35 +146,41 @@ jobs:
137
146
- uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
138
147
if : ${{ failure() && steps.test.conclusion == 'failure' }}
139
148
with :
140
- name : ${{ matrix.os }}-${{ (matrix.race && 'race') || 'norace' }}-new-baselines-artifact
149
+ name : ${{ matrix.config. os }}-${{ (matrix.config .race && 'race') || 'norace' }}-new-baselines-artifact
141
150
path : testdata/baselines/local
142
151
143
152
lint :
144
153
strategy :
145
154
fail-fast : false
146
155
matrix :
147
- include :
156
+ config :
148
157
- os : ubuntu-latest
149
158
- os : windows-latest
159
+ skip : ${{ github.event_name == 'merge_group' }}
150
160
- os : macos-latest
161
+ skip : ${{ github.event_name == 'merge_group' }}
151
162
- os : ubuntu-latest
152
163
name : ' noembed'
153
164
noembed : true
165
+ skip : ${{ github.event_name == 'merge_group' }}
166
+ exclude :
167
+ - config :
168
+ skip : true
154
169
155
- name : lint (${{ matrix.name || matrix.os }})
170
+ name : lint (${{ matrix.config. name || matrix.config .os }})
156
171
157
- runs-on : ${{ matrix.os }}
172
+ runs-on : ${{ matrix.config. os }}
158
173
159
174
env :
160
- TSGO_HEREBY_NOEMBED : ${{ (matrix.noembed && 'true') || 'false' }}
175
+ TSGO_HEREBY_NOEMBED : ${{ (matrix.config. noembed && 'true') || 'false' }}
161
176
162
177
steps :
163
178
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
164
179
- uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
165
180
- uses : dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
166
181
- uses : ./.github/actions/setup-go
167
182
with :
168
- cache-name : lint${{ (matrix.noembed && '-noembed') || ''}}
183
+ cache-name : lint${{ (matrix.config. noembed && '-noembed') || ''}}
169
184
170
185
- run : npm ci
171
186
@@ -308,17 +323,20 @@ jobs:
308
323
runs-on : ubuntu-latest
309
324
if : ${{ always() }}
310
325
needs :
326
+ - baselines
311
327
- build
312
- - test
313
- - lint
328
+ - extension
314
329
- format
315
330
- generate
316
- - tidy
331
+ - lint
332
+ - misc
317
333
- smoke
334
+ - test
335
+ - tidy
318
336
319
337
steps :
320
338
- name : Check required jobs
321
339
env :
322
340
NEEDS : ${{ toJson(needs) }}
323
341
run : |
324
- ! echo $NEEDS | jq -e 'to_entries[] | { job: .key, result: .value.result } | select(.result != "success")'
342
+ ! echo $NEEDS | jq -e 'to_entries[] | { job: .key, result: .value.result } | select(( .result == "success" or .result == "skipped") | not )'
0 commit comments