Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TypeSpecValidationAll] Improve UI of matrix jobs #31341

Merged
merged 4 commits into from
Oct 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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' || '' }}
mikeharder marked this conversation as resolved.
Show resolved Hide resolved

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