From 8ddcd326f13de9d1d9710c054ea63812996e49e5 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Wed, 21 Jan 2026 15:30:26 +0000 Subject: [PATCH] Support customising test directories in PR check specs --- pr-checks/sync.py | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/pr-checks/sync.py b/pr-checks/sync.py index 77696b91f..3af031d4a 100755 --- a/pr-checks/sync.py +++ b/pr-checks/sync.py @@ -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', ''))