Support customising test directories in PR check specs

This commit is contained in:
Michael B. Gale
2026-01-21 15:30:26 +00:00
parent 32c67450a1
commit 8ddcd326f1
+24 -11
View File
@@ -83,10 +83,18 @@ for file in sorted((this_dir / 'checks').glob('*.yml')):
runnerImagesForOs = [image for image in runnerImages if image.startswith(operatingSystem)]
for runnerImage in runnerImagesForOs:
matrix.append({
'os': runnerImage,
'version': version
})
if 'testDirectories' in checkSpecification:
for testDirectory in checkSpecification.get('testDirectories'):
matrix.append({
'os': runnerImage,
'version': version,
'test-directory': testDirectory
})
else:
matrix.append({
'os': runnerImage,
'version': version
})
useAllPlatformBundle = "false" # Default to false
if checkSpecification.get('useAllPlatformBundle'):
@@ -129,17 +137,22 @@ for file in sorted((this_dir / 'checks').glob('*.yml')):
},
])
prepareWith = {
'version': '${{ matrix.version }}',
'use-all-platform-bundle': useAllPlatformBundle,
# If the action is being run from a container, then do not setup kotlin.
# This is because the kotlin binaries cannot be downloaded from the container.
'setup-kotlin': str(not 'container' in checkSpecification).lower(),
}
if 'testDirectories' in checkSpecification:
prepareWith['test-directory'] = '${{ matrix.test-directory }}'
steps.append({
'name': 'Prepare test',
'id': 'prepare-test',
'uses': './.github/actions/prepare-test',
'with': {
'version': '${{ matrix.version }}',
'use-all-platform-bundle': useAllPlatformBundle,
# If the action is being run from a container, then do not setup kotlin.
# This is because the kotlin binaries cannot be downloaded from the container.
'setup-kotlin': str(not 'container' in checkSpecification).lower(),
}
'with': prepareWith,
})
installGo = is_truthy(checkSpecification.get('installGo', ''))