Use runnerSize property instead of runnerImages for better compatibility

Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-10-30 11:04:45 +00:00
parent cbbc19b214
commit 8afe386a9f
4 changed files with 16 additions and 20 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
name: "Clean up database cluster directory"
description: "The database cluster directory is cleaned up if it is not empty."
versions: ["linked"]
runnerImages: ["ubuntu-slim"]
runnerSize: "slim"
steps:
- name: Add a file to the database cluster directory
run: |
+1 -1
View File
@@ -2,7 +2,7 @@ name: "Config input"
description: "Tests specifying configuration using the config input"
installNode: true
versions: ["linked"]
runnerImages: ["ubuntu-slim"]
runnerSize: "slim"
steps:
- name: Copy queries into workspace
run: |
+1 -1
View File
@@ -1,7 +1,7 @@
name: "Language aliases"
description: "Tests that language aliases are resolved correctly"
versions: ["linked"]
runnerImages: ["ubuntu-slim"]
runnerSize: "slim"
steps:
- uses: ./../action/init
with:
+13 -17
View File
@@ -76,25 +76,21 @@ for file in sorted((this_dir / 'checks').glob('*.yml')):
if version == "latest":
raise ValueError('Did not recognize "version: latest". Did you mean "version: linked"?')
# Check if a specific runner image is specified in the check
customRunnerImages = checkSpecification.get('runnerImages')
if customRunnerImages:
# Use custom runner images specified in the check
runnerImages = customRunnerImages
else:
# Use default runner images based on operating systems
runnerImages = ["ubuntu-latest", "macos-latest", "windows-latest"]
# Determine runner size (default is "latest")
# "default" maps to "latest" for the runner image name
runnerSize = checkSpecification.get('runnerSize', 'default')
actualRunnerSize = 'latest' if runnerSize == 'default' else runnerSize
# Build runner images based on runner size and operating systems
operatingSystems = checkSpecification.get('operatingSystems', ["ubuntu"])
for operatingSystem in operatingSystems:
runnerImagesForOs = [image for image in runnerImages if image.startswith(operatingSystem)]
for runnerImage in runnerImagesForOs:
matrix.append({
'os': runnerImage,
'version': version
})
# Construct the runner image name: {os}-{size}
runnerImage = f"{operatingSystem}-{actualRunnerSize}"
matrix.append({
'os': runnerImage,
'version': version
})
useAllPlatformBundle = "false" # Default to false
if checkSpecification.get('useAllPlatformBundle'):