File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -156,6 +156,34 @@ function main(): void {
156156 workflowInputs = checkSpecification . inputs ;
157157 }
158158
159+ let matrix : Array < Record < string , any > > = [ ] ;
160+
161+ for ( const version of checkSpecification . versions ?? defaultTestVersions ) {
162+ if ( version === "latest" ) {
163+ throw new Error (
164+ 'Did not recognise "version: latest". Did you mean "version: linked"?' ,
165+ ) ;
166+ }
167+
168+ const runnerImages = [ "ubuntu-latest" , "macos-latest" , "windows-latest" ] ;
169+ const operatingSystems = checkSpecification . operatingSystems ?? [
170+ "ubuntu" ,
171+ ] ;
172+
173+ for ( const operatingSystem of operatingSystems ) {
174+ const runnerImagesForOs = runnerImages . filter ( ( image ) =>
175+ image . startsWith ( operatingSystem ) ,
176+ ) ;
177+
178+ for ( const runnerImage of runnerImagesForOs ) {
179+ matrix . push ( {
180+ os : runnerImage ,
181+ version,
182+ } ) ;
183+ }
184+ }
185+ }
186+
159187 let extraGroupName = "" ;
160188 for ( const inputName of Object . keys ( workflowInputs ) ) {
161189 extraGroupName += "-${{inputs." + inputName + "}}" ;
You can’t perform that action at this time.
0 commit comments