Skip to content

Commit 5f597e5

Browse files
mikeharderhaagha
authored andcommitted
[TypeSpecValidationAll] Improve UI of matrix jobs (#31341)
- Fixes #31339
1 parent 4aa2af6 commit 5f597e5

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

.github/workflows/typespec-validation-all.yaml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,26 @@ on:
3434

3535
jobs:
3636
typespec-validation-all:
37-
name: TypeSpec Validation All
37+
# Use short name to maximize space for parameters in UI
38+
name: TSV
39+
3840
strategy:
41+
# Validate all specs, even if one job fails early
3942
fail-fast: false
43+
# Sort matrix elements from "most important" to "least important" for the best grouping and UI
44+
# Keep matrix values short, to maximize number of parameters shown in UI
4045
matrix:
41-
os: [ubuntu-latest, windows-latest]
46+
# When triggered by schedule, validate both the default branch and typespec-next
47+
# Use the placeholder string "default" instead of passing "" directly, since the latter gets ignored by
48+
# the GitHub Jobs UI.
49+
ref: ${{ fromJSON(github.event_name == 'schedule' && '["default", "next"]' || '["default"]') }}
50+
os: [ubuntu, windows]
4251
# shards must start at 0 and increment by 1
4352
shard: [0, 1, 2]
4453
# total-shards must be an accurate count of the number of shards
4554
total-shards: [3]
46-
# When triggered by schedule, validate both the default branch and typespec-next
47-
# Use the placeholder string "default" instead of passing "" directly, since the latter gets ignored by
48-
# the GitHub Jobs UI.
49-
ref: ${{ fromJSON(github.event_name == 'schedule' && '["default", "typespec-next"]' || '["default"]') }}
5055

51-
runs-on: ${{ matrix.os }}
56+
runs-on: ${{ matrix.os }}-latest
5257

5358
steps:
5459
- name: Enable git long paths
@@ -58,7 +63,7 @@ jobs:
5863
- uses: actions/checkout@v4
5964
with:
6065
# Convert placeholder string 'default' to '', which tells the action to checkout the default ref.
61-
ref: ${{ matrix.ref != 'default' && matrix.ref || '' }}
66+
ref: ${{ matrix.ref == 'next' && 'typespec-next' || '' }}
6267

6368
- name: Setup Node 20 and run `npm ci`
6469
uses: ./.github/actions/setup-node-npm-ci

0 commit comments

Comments
 (0)