( workflows: WorkflowManifestEntry[], platforms: SetupPlatform[], )
| 245 | } |
| 246 | |
| 247 | function getDefaultWorkflowIdsForPlatforms( |
| 248 | workflows: WorkflowManifestEntry[], |
| 249 | platforms: SetupPlatform[], |
| 250 | ): string[] { |
| 251 | const availableIds = new Set(workflows.map((workflow) => workflow.id)); |
| 252 | const defaults: string[] = []; |
| 253 | |
| 254 | if (platforms.includes('macOS') && availableIds.has('macos')) { |
| 255 | defaults.push('macos'); |
| 256 | } |
| 257 | |
| 258 | if (platforms.some((platform) => platform !== 'macOS') && availableIds.has('simulator')) { |
| 259 | defaults.push('simulator'); |
| 260 | } |
| 261 | |
| 262 | return defaults; |
| 263 | } |
| 264 | |
| 265 | function toWorkflowSelectOptions(workflows: WorkflowManifestEntry[]): SelectOption<string>[] { |
| 266 | return workflows.map((workflow) => ({ |
no test coverage detected