|
34 | 34 |
|
35 | 35 | jobs: |
36 | 36 | typespec-validation-all: |
37 | | - name: TypeSpec Validation All |
| 37 | + # Use short name to maximize space for parameters in UI |
| 38 | + name: TSV |
| 39 | + |
38 | 40 | strategy: |
| 41 | + # Validate all specs, even if one job fails early |
39 | 42 | 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 |
40 | 45 | 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] |
42 | 51 | # shards must start at 0 and increment by 1 |
43 | 52 | shard: [0, 1, 2] |
44 | 53 | # total-shards must be an accurate count of the number of shards |
45 | 54 | 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"]') }} |
50 | 55 |
|
51 | | - runs-on: ${{ matrix.os }} |
| 56 | + runs-on: ${{ matrix.os }}-latest |
52 | 57 |
|
53 | 58 | steps: |
54 | 59 | - name: Enable git long paths |
|
58 | 63 | - uses: actions/checkout@v4 |
59 | 64 | with: |
60 | 65 | # 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' || '' }} |
62 | 67 |
|
63 | 68 | - name: Setup Node 20 and run `npm ci` |
64 | 69 | uses: ./.github/actions/setup-node-npm-ci |
|
0 commit comments