Skip to content

Commit

Permalink
[TypeSpecValidationAll] Improve UI of matrix jobs (Azure#31341)
Browse files Browse the repository at this point in the history
- Fixes Azure#31339
  • Loading branch information
mikeharder authored Oct 30, 2024
1 parent 20b3f44 commit 3b822e9
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/typespec-validation-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,26 @@ on:

jobs:
typespec-validation-all:
name: TypeSpec Validation All
# Use short name to maximize space for parameters in UI
name: TSV

strategy:
# Validate all specs, even if one job fails early
fail-fast: false
# Sort matrix elements from "most important" to "least important" for the best grouping and UI
# Keep matrix values short, to maximize number of parameters shown in UI
matrix:
os: [ubuntu-latest, windows-latest]
# When triggered by schedule, validate both the default branch and typespec-next
# Use the placeholder string "default" instead of passing "" directly, since the latter gets ignored by
# the GitHub Jobs UI.
ref: ${{ fromJSON(github.event_name == 'schedule' && '["default", "next"]' || '["default"]') }}
os: [ubuntu, windows]
# shards must start at 0 and increment by 1
shard: [0, 1, 2]
# total-shards must be an accurate count of the number of shards
total-shards: [3]
# When triggered by schedule, validate both the default branch and typespec-next
# Use the placeholder string "default" instead of passing "" directly, since the latter gets ignored by
# the GitHub Jobs UI.
ref: ${{ fromJSON(github.event_name == 'schedule' && '["default", "typespec-next"]' || '["default"]') }}

runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest

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

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

0 comments on commit 3b822e9

Please sign in to comment.