From afa73f66149e5eac2f4787581fbca1bb44623739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Wed, 8 Feb 2023 11:47:14 +0100 Subject: [PATCH 01/17] feature: allow to exclude specific PHP versions and/or dependency sets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- laminas-ci.schema.json | 45 ++++++++++++++++++- src/config/app.ts | 35 ++++++++++++++- src/config/input.ts | 2 + .../.laminas-ci.json | 9 ++++ .../composer.json | 5 +++ .../matrix.json | 40 +++++++++++++++++ .../phpunit.xml.dist | 2 + .../.laminas-ci.json | 8 ++++ .../composer.json | 5 +++ .../matrix.json | 34 ++++++++++++++ .../phpunit.xml.dist | 2 + 11 files changed, 184 insertions(+), 3 deletions(-) create mode 100644 tests/configuration-exclude-php-dependency-combination/.laminas-ci.json create mode 100644 tests/configuration-exclude-php-dependency-combination/composer.json create mode 100644 tests/configuration-exclude-php-dependency-combination/matrix.json create mode 100644 tests/configuration-exclude-php-dependency-combination/phpunit.xml.dist create mode 100644 tests/configuration-exclude-php-specific-version/.laminas-ci.json create mode 100644 tests/configuration-exclude-php-specific-version/composer.json create mode 100644 tests/configuration-exclude-php-specific-version/matrix.json create mode 100644 tests/configuration-exclude-php-specific-version/phpunit.xml.dist diff --git a/laminas-ci.schema.json b/laminas-ci.schema.json index 823f4804..09c32a34 100644 --- a/laminas-ci.schema.json +++ b/laminas-ci.schema.json @@ -25,6 +25,11 @@ "exclude": [ { "name": "Codeception [7.4, latest]" + }, + { + "name": "Codeception", + "php": "7.4", + "dependencies": "latest" } ], "ignore_php_platform_requirements": { @@ -285,6 +290,11 @@ [ { "name": "Codeception [7.4, latest]" + }, + { + "name": "Codeception", + "php": "7.4", + "dependencies": "latest" } ] ], @@ -294,6 +304,11 @@ "examples": [ { "name": "Codeception [7.4, latest]" + }, + { + "name": "Codeception", + "php": "7.4", + "dependencies": "latest" } ], "required": [ @@ -306,8 +321,36 @@ "description": "The name of the job to be excluded. Must be an exact match.", "minLength": 1, "examples": [ - "Codeception [7.4, latest]" + "Codeception [7.4, latest]", + "Codeception" ] + }, + "php": { + "type": "string", + "title": "The php version", + "description": "The PHP version to to be excluded.", + "enum": [ + "5.6", + "7.0", + "7.1", + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "*", + "@latest", + "@lowest" + ], + "default": "*" + }, + "dependencies": { + "type": "string", + "enum": ["latest", "lowest", "locked", "*"], + "title": "The composer dependencies to be excluded", + "description": "The composer dependencies to be excluded. If the wildcard `*` is passed, all dependencies are being excluded", + "default": "*" } }, "additionalProperties": false diff --git a/src/config/app.ts b/src/config/app.ts index 8cc7cdf0..f14da889 100644 --- a/src/config/app.ts +++ b/src/config/app.ts @@ -5,7 +5,7 @@ import {isToolRunningContainerDefaultPhpVersion, Tool, ToolExecutionType} from ' import {Logger} from '../logging'; import {CURRENT_STABLE, INSTALLABLE_VERSIONS, InstallablePhpVersionType, isInstallableVersion} from './php'; import {ComposerJson} from './composer'; -import {ConfigurationFromFile, isAdditionalChecksConfiguration, isAnyComposerDependencySet, isAnyPhpVersionType, isConfigurationContainingJobExclusions, isExplicitChecksConfiguration, isLatestPhpVersionType, isLowestPhpVersionType, JobDefinitionFromFile, JobFromFile, JobToExcludeFromFile} from './input'; +import {ConfigurationFromFile, isAdditionalChecksConfiguration, isAnyComposerDependencySet, isAnyPhpVersionType, isConfigurationContainingJobExclusions, isExplicitChecksConfiguration, isLatestPhpVersionType, isLowestPhpVersionType, JobDefinitionFromFile, JobFromFile, JobToExcludeFromFile, WILDCARD_ALIAS} from './input'; export const OPERATING_SYSTEM = 'ubuntu-latest'; export const ACTION = 'laminas/laminas-continuous-integration-action@v1'; @@ -242,12 +242,43 @@ function isJobExcludedByDeprecatedCommandName(job: Job, exclusions: JobToExclude ); } +function isJobExcludedByConfiguration(job: Job, exclude: JobToExcludeFromFile, config: Config): boolean { + if (job.name !== exclude.name) { + return false; + } + + const phpVersionToExclude = exclude.php ?? WILDCARD_ALIAS; + const dependenciesToExclude = exclude.dependencies ?? WILDCARD_ALIAS; + + if (!isAnyPhpVersionType(phpVersionToExclude)) { + if (isLowestPhpVersionType(phpVersionToExclude) && job.job.php !== config.minimumPhpVersion) { + return false; + } + + if (isLatestPhpVersionType(phpVersionToExclude) && job.job.php !== config.latestPhpVersion) { + return false; + } + + if (phpVersionToExclude !== job.job.php) { + return false; + } + } + + if (!isAnyComposerDependencySet(dependenciesToExclude)) { + if (dependenciesToExclude !== job.job.composerDependencySet) { + return false; + } + } + + return true; +} + function isJobExcluded(job: Job, exclusions: JobToExcludeFromFile[], config: Config, logger: Logger): boolean { if (exclusions.length === 0) { return false; } - if (exclusions.some((exclude) => job.name === exclude.name)) { + if (exclusions.some((exclude) => isJobExcludedByConfiguration(job, exclude, config))) { logger.info(`Job with name ${ job.name } is excluded due to application config.`); return true; diff --git a/src/config/input.ts b/src/config/input.ts index b4f5e9b0..3d50658b 100644 --- a/src/config/input.ts +++ b/src/config/input.ts @@ -3,6 +3,8 @@ import {ComposerDependencySet, IgnorePhpPlatformRequirements} from './app'; export interface JobToExcludeFromFile { name: string; + php?: InstallablePhpVersionType, + dependencies?: ComposerDependencySet, } export interface ConfigurationFromFile { diff --git a/tests/configuration-exclude-php-dependency-combination/.laminas-ci.json b/tests/configuration-exclude-php-dependency-combination/.laminas-ci.json new file mode 100644 index 00000000..808b7d40 --- /dev/null +++ b/tests/configuration-exclude-php-dependency-combination/.laminas-ci.json @@ -0,0 +1,9 @@ +{ + "exclude": [ + { + "name": "PHPUnit", + "php": "8.1", + "dependencies": "latest" + } + ] +} diff --git a/tests/configuration-exclude-php-dependency-combination/composer.json b/tests/configuration-exclude-php-dependency-combination/composer.json new file mode 100644 index 00000000..31a4819d --- /dev/null +++ b/tests/configuration-exclude-php-dependency-combination/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + } +} diff --git a/tests/configuration-exclude-php-dependency-combination/matrix.json b/tests/configuration-exclude-php-dependency-combination/matrix.json new file mode 100644 index 00000000..4edb18f2 --- /dev/null +++ b/tests/configuration-exclude-php-dependency-combination/matrix.json @@ -0,0 +1,40 @@ +{ + "include": [ + { + "name": "PHPUnit [8.0, lowest]", + "job": "{\"command\":\"test\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"lowest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "operatingSystem": "ubuntu-latest", + "action": "laminas/laminas-continuous-integration-action@v1" + }, + { + "name": "PHPUnit [8.0, locked]", + "job": "{\"command\":\"test\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"locked\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "operatingSystem": "ubuntu-latest", + "action": "laminas/laminas-continuous-integration-action@v1" + }, + { + "name": "PHPUnit [8.0, latest]", + "job": "{\"command\":\"test\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"latest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "operatingSystem": "ubuntu-latest", + "action": "laminas/laminas-continuous-integration-action@v1" + }, + { + "name": "PHPUnit [8.1, lowest]", + "job": "{\"command\":\"test\",\"php\":\"8.1\",\"extensions\":[],\"ini\":[],\"dependencies\":\"lowest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "operatingSystem": "ubuntu-latest", + "action": "laminas/laminas-continuous-integration-action@v1" + }, + { + "name": "PHPUnit [8.2, lowest]", + "job": "{\"command\":\"test\",\"php\":\"8.2\",\"extensions\":[],\"ini\":[],\"dependencies\":\"lowest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "operatingSystem": "ubuntu-latest", + "action": "laminas/laminas-continuous-integration-action@v1" + }, + { + "name": "PHPUnit [8.2, latest]", + "job": "{\"command\":\"test\",\"php\":\"8.2\",\"extensions\":[],\"ini\":[],\"dependencies\":\"latest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "operatingSystem": "ubuntu-latest", + "action": "laminas/laminas-continuous-integration-action@v1" + } + ] +} diff --git a/tests/configuration-exclude-php-dependency-combination/phpunit.xml.dist b/tests/configuration-exclude-php-dependency-combination/phpunit.xml.dist new file mode 100644 index 00000000..0e632ce3 --- /dev/null +++ b/tests/configuration-exclude-php-dependency-combination/phpunit.xml.dist @@ -0,0 +1,2 @@ + + diff --git a/tests/configuration-exclude-php-specific-version/.laminas-ci.json b/tests/configuration-exclude-php-specific-version/.laminas-ci.json new file mode 100644 index 00000000..9c05507c --- /dev/null +++ b/tests/configuration-exclude-php-specific-version/.laminas-ci.json @@ -0,0 +1,8 @@ +{ + "exclude": [ + { + "name": "PHPUnit", + "php": "8.1" + } + ] +} diff --git a/tests/configuration-exclude-php-specific-version/composer.json b/tests/configuration-exclude-php-specific-version/composer.json new file mode 100644 index 00000000..31a4819d --- /dev/null +++ b/tests/configuration-exclude-php-specific-version/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + } +} diff --git a/tests/configuration-exclude-php-specific-version/matrix.json b/tests/configuration-exclude-php-specific-version/matrix.json new file mode 100644 index 00000000..691085d4 --- /dev/null +++ b/tests/configuration-exclude-php-specific-version/matrix.json @@ -0,0 +1,34 @@ +{ + "include": [ + { + "name": "PHPUnit [8.0, lowest]", + "job": "{\"command\":\"test\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"lowest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "operatingSystem": "ubuntu-latest", + "action": "laminas/laminas-continuous-integration-action@v1" + }, + { + "name": "PHPUnit [8.0, locked]", + "job": "{\"command\":\"test\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"locked\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "operatingSystem": "ubuntu-latest", + "action": "laminas/laminas-continuous-integration-action@v1" + }, + { + "name": "PHPUnit [8.0, latest]", + "job": "{\"command\":\"test\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"latest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "operatingSystem": "ubuntu-latest", + "action": "laminas/laminas-continuous-integration-action@v1" + }, + { + "name": "PHPUnit [8.2, lowest]", + "job": "{\"command\":\"test\",\"php\":\"8.2\",\"extensions\":[],\"ini\":[],\"dependencies\":\"lowest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "operatingSystem": "ubuntu-latest", + "action": "laminas/laminas-continuous-integration-action@v1" + }, + { + "name": "PHPUnit [8.2, latest]", + "job": "{\"command\":\"test\",\"php\":\"8.2\",\"extensions\":[],\"ini\":[],\"dependencies\":\"latest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "operatingSystem": "ubuntu-latest", + "action": "laminas/laminas-continuous-integration-action@v1" + } + ] +} diff --git a/tests/configuration-exclude-php-specific-version/phpunit.xml.dist b/tests/configuration-exclude-php-specific-version/phpunit.xml.dist new file mode 100644 index 00000000..0e632ce3 --- /dev/null +++ b/tests/configuration-exclude-php-specific-version/phpunit.xml.dist @@ -0,0 +1,2 @@ + + From d526f25c79b2a3316b0053515c8b86bd892aa799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Wed, 8 Feb 2023 11:50:07 +0100 Subject: [PATCH 02/17] docs: describe how job exclusion works with the most recent changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- README.md | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cdcaf7ac..e01f8266 100644 --- a/README.md +++ b/README.md @@ -200,18 +200,45 @@ The tool discovers checks first, then appends any `additional_checks` are concat ### Excluding specific jobs -The easiest way to exclude a single job is via the `name` parameter: +You can exclude specific jobs by using their names: ```json { "exclude": [ { - "name": "PHPUnit on PHP 8.0 with latest dependencies" + "name": "PHPUnit" } ] } ``` +If you want to limit the exclusion to specific PHP versions, you can additionally add a PHP version: + +```json +{ + "exclude": [ + { + "name": "PHPUnit", + "php": "8.0" + } + ] +} +``` + +In case you only want to exclude jobs for specific composer dependency sets, add `dependencies` to the `exclude` configuration: + +```json +{ + "exclude": [ + { + "name": "PHPUnit", + "php": "8.0", + "dependencies": "latest" + } + ] +} +``` + ## Testing matrix generation locally using Docker To test matrix generation in a local checkout on your own machine, you can do the following: From 5a7d64c04adc35a9c5ed49154e6fffafb15348ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Wed, 8 Feb 2023 17:05:01 +0100 Subject: [PATCH 03/17] bugfix: use `job.tool.name` in case it is available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the problem that the job name does not match for tools due to the fact that the name already contains the human-readable name containing the version and dependencies string. Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- src/config/app.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/config/app.ts b/src/config/app.ts index f14da889..54e64e44 100644 --- a/src/config/app.ts +++ b/src/config/app.ts @@ -243,7 +243,9 @@ function isJobExcludedByDeprecatedCommandName(job: Job, exclusions: JobToExclude } function isJobExcludedByConfiguration(job: Job, exclude: JobToExcludeFromFile, config: Config): boolean { - if (job.name !== exclude.name) { + const jobName = isJobFromTool(job) ? job.tool.name : job.name; + + if (jobName !== exclude.name) { return false; } From 226a4ff085f3fa1325878b2e48daf96cd9f3136c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Wed, 8 Feb 2023 17:05:27 +0100 Subject: [PATCH 04/17] qa: add debug logging on why a job might not be excluded MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- src/config/app.ts | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/src/config/app.ts b/src/config/app.ts index 54e64e44..2f31d73c 100644 --- a/src/config/app.ts +++ b/src/config/app.ts @@ -242,7 +242,12 @@ function isJobExcludedByDeprecatedCommandName(job: Job, exclusions: JobToExclude ); } -function isJobExcludedByConfiguration(job: Job, exclude: JobToExcludeFromFile, config: Config): boolean { +function isJobExcludedByConfiguration( + job: Job, + exclude: JobToExcludeFromFile, + config: Config, + logger: Logger +): boolean { const jobName = isJobFromTool(job) ? job.tool.name : job.name; if (jobName !== exclude.name) { @@ -253,23 +258,35 @@ function isJobExcludedByConfiguration(job: Job, exclude: JobToExcludeFromFile, c const dependenciesToExclude = exclude.dependencies ?? WILDCARD_ALIAS; if (!isAnyPhpVersionType(phpVersionToExclude)) { + const nonExcludedPhpVersionDebugMessage = `Job with name ${ jobName } is not matching exclusion rule` + + ` with name ${ exclude.name } due to non-excluded php version.`; + if (isLowestPhpVersionType(phpVersionToExclude) && job.job.php !== config.minimumPhpVersion) { + logger.debug(nonExcludedPhpVersionDebugMessage); + return false; } if (isLatestPhpVersionType(phpVersionToExclude) && job.job.php !== config.latestPhpVersion) { + logger.debug(nonExcludedPhpVersionDebugMessage); + return false; } if (phpVersionToExclude !== job.job.php) { + logger.debug(nonExcludedPhpVersionDebugMessage); + return false; } } - if (!isAnyComposerDependencySet(dependenciesToExclude)) { - if (dependenciesToExclude !== job.job.composerDependencySet) { - return false; - } + if (!isAnyComposerDependencySet(dependenciesToExclude) && dependenciesToExclude !== job.job.composerDependencySet) { + logger.debug( + `Job with name ${ jobName } is not matching exclusion rule` + + ` with name ${ exclude.name } due to non-excluded Composer dependencies.` + ); + + return false; } return true; @@ -280,7 +297,7 @@ function isJobExcluded(job: Job, exclusions: JobToExcludeFromFile[], config: Con return false; } - if (exclusions.some((exclude) => isJobExcludedByConfiguration(job, exclude, config))) { + if (exclusions.some((exclude) => isJobExcludedByConfiguration(job, exclude, config, logger))) { logger.info(`Job with name ${ job.name } is excluded due to application config.`); return true; From 5c3b65574e9e8665cdf153d06796684dbae1574b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Thu, 23 Feb 2023 22:55:35 +0100 Subject: [PATCH 05/17] docs: use `Composer` brand name where possible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e01f8266..ab13ff88 100644 --- a/README.md +++ b/README.md @@ -111,8 +111,8 @@ The "job" element will have the following elements, but is not restricted to the ], "dependencies": "(optional) dependencies to test against; one of lowest, locked, latest. default: locked", "command": "(required) command to run to perform the check", - "ignore_platform_reqs_8": "(optional; deprecated) boolean; whether to add `--ignore-platform-req=php` to composer for PHP 8.0. default: true", - "ignore_php_platform_requirement": "(optional) boolean; whether to add `--ignore-platform-req=php` to composer for this job.", + "ignore_platform_reqs_8": "(optional; deprecated) boolean; whether to add `--ignore-platform-req=php` to Composer for PHP 8.0. default: true", + "ignore_php_platform_requirement": "(optional) boolean; whether to add `--ignore-platform-req=php` to Composer for this job.", "additional_composer_arguments": [ "(optional) list of arguments to be passed to `composer install` and `composer update`" ] @@ -225,7 +225,7 @@ If you want to limit the exclusion to specific PHP versions, you can additionall } ``` -In case you only want to exclude jobs for specific composer dependency sets, add `dependencies` to the `exclude` configuration: +In case you only want to exclude jobs for specific Composer dependency sets, add `dependencies` to the `exclude` configuration: ```json { From cfcdeb8bb619da8588ee1f567ff76bf838dc8bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Sun, 5 May 2024 15:57:46 +0200 Subject: [PATCH 06/17] bugfix: we always have to check for the `job.name` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The exclusion strategy, when it was introduced, was meant to handle exact job names. By having the new feature of excluding tool names as well, we should still support the fill job.name as well so that we can still properly exclude jobs based on the initial exclusion strategy. Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- src/config/app.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/config/app.ts b/src/config/app.ts index 2f31d73c..e91ef82d 100644 --- a/src/config/app.ts +++ b/src/config/app.ts @@ -250,7 +250,10 @@ function isJobExcludedByConfiguration( ): boolean { const jobName = isJobFromTool(job) ? job.tool.name : job.name; - if (jobName !== exclude.name) { + if ( + jobName !== exclude.name + && exclude.name !== job.name + ) { return false; } From 9095f96bb8a7a242a867f8c4f1deb9e224987fe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Sun, 5 May 2024 16:03:03 +0200 Subject: [PATCH 07/17] refactor: reduce the cognitive complexity of `app#isJobExcludedByConfiguration` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- src/config/app.ts | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/config/app.ts b/src/config/app.ts index e91ef82d..b8046107 100644 --- a/src/config/app.ts +++ b/src/config/app.ts @@ -242,21 +242,30 @@ function isJobExcludedByDeprecatedCommandName(job: Job, exclusions: JobToExclude ); } +function isJobExcludedByName(job: Job, exclude: JobToExcludeFromFile): boolean { + if (job.name === exclude.name) { + return true; + } + + if (isJobFromTool(job)) { + return job.tool.name === exclude.name; + } + + return false; +} + function isJobExcludedByConfiguration( job: Job, exclude: JobToExcludeFromFile, config: Config, logger: Logger ): boolean { - const jobName = isJobFromTool(job) ? job.tool.name : job.name; - - if ( - jobName !== exclude.name - && exclude.name !== job.name - ) { + if (!isJobExcludedByName(job, exclude)) { return false; } + const jobName = isJobFromTool(job) ? job.tool.name : job.name; + const phpVersionToExclude = exclude.php ?? WILDCARD_ALIAS; const dependenciesToExclude = exclude.dependencies ?? WILDCARD_ALIAS; From 3c482c2b500ba102bdf5a88e29211995ac8499aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Sun, 5 May 2024 16:04:40 +0200 Subject: [PATCH 08/17] qa: add missing `test.env` files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With one of the newer versions of the matrix action, `test.env` files were introduced and thus have to be added to the new test cases as well. Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- tests/configuration-exclude-php-dependency-combination/test.env | 0 tests/configuration-exclude-php-specific-version/test.env | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/configuration-exclude-php-dependency-combination/test.env create mode 100644 tests/configuration-exclude-php-specific-version/test.env diff --git a/tests/configuration-exclude-php-dependency-combination/test.env b/tests/configuration-exclude-php-dependency-combination/test.env new file mode 100644 index 00000000..e69de29b diff --git a/tests/configuration-exclude-php-specific-version/test.env b/tests/configuration-exclude-php-specific-version/test.env new file mode 100644 index 00000000..e69de29b From da9f358d64c96e281dad3abdb2479554daa26fe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Sun, 5 May 2024 16:20:14 +0200 Subject: [PATCH 09/17] qa: put `php` schema definition into dedicated `definition` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows us to reference to that definition which eases the usage in several parts of the configuration. Having the list of supported PHP versions maintained in more than one location may become annoying and thus this changes makes a lot of sense. Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- laminas-ci.schema.json | 63 +++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 38 deletions(-) diff --git a/laminas-ci.schema.json b/laminas-ci.schema.json index 09c32a34..f6575ebe 100644 --- a/laminas-ci.schema.json +++ b/laminas-ci.schema.json @@ -248,6 +248,26 @@ } ], "definitions": { + "php": { + "type": "string", + "title": "The php version", + "enum": [ + "5.6", + "7.0", + "7.1", + "7.2", + "7.3", + "7.4", + "8.0", + "8.1", + "8.2", + "8.3", + "*", + "@default", + "@latest", + "@lowest" + ] + }, "extensions": { "type": "array", "title": "A list of PHP extensions", @@ -326,23 +346,8 @@ ] }, "php": { - "type": "string", - "title": "The php version", + "ref": "#/definitions/php", "description": "The PHP version to to be excluded.", - "enum": [ - "5.6", - "7.0", - "7.1", - "7.2", - "7.3", - "7.4", - "8.0", - "8.1", - "8.2", - "*", - "@latest", - "@lowest" - ], "default": "*" }, "dependencies": { @@ -374,13 +379,10 @@ } }, "stablePHP": { - "type": "string", - "minLength": 1, + "$ref": "#/definitions/php", "title": "The PHP version to be used for stable checks", "description": "This PHP version is used for all QA check jobs. The default depends on the `composer.json` of the project and usually reflects the minimum supported PHP version of that project.", - "examples": [ - "8.0" - ] + "default": "8.0" }, "backwardCompatibilityCheck": { "type": "boolean", @@ -404,24 +406,9 @@ ], "properties": { "php": { - "type": "string", - "title": "The php version", + "$ref": "#/definitions/php", "description": "The PHP version to be used. If the wildcard `*` is passed, a list of checks is created containing *every* supported PHP version by the project and the matrix action.", - "enum": [ - "5.6", - "7.0", - "7.1", - "7.2", - "7.3", - "7.4", - "8.0", - "8.1", - "8.2", - "8.3", - "*", - "@latest", - "@lowest" - ] + "default": "*" }, "dependencies": { "type": "string", From 5ff1be7a70fdb1e905ad921bed3b6802d08c4b63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Sun, 5 May 2024 16:25:49 +0200 Subject: [PATCH 10/17] qa: add `before_script` section to the matrix output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was introduced in a more recent matrix version and thus was missing the expected matrix from the initial version of this feature. Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- .../matrix.json | 12 ++++++------ .../matrix.json | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/configuration-exclude-php-dependency-combination/matrix.json b/tests/configuration-exclude-php-dependency-combination/matrix.json index 4edb18f2..b57750b3 100644 --- a/tests/configuration-exclude-php-dependency-combination/matrix.json +++ b/tests/configuration-exclude-php-dependency-combination/matrix.json @@ -2,37 +2,37 @@ "include": [ { "name": "PHPUnit [8.0, lowest]", - "job": "{\"command\":\"test\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"lowest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "job": "{\"command\":\"./vendor/bin/phpunit\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"lowest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[\"xmllint --schema vendor/phpunit/phpunit/phpunit.xsd phpunit.xml.dist\"]}", "operatingSystem": "ubuntu-latest", "action": "laminas/laminas-continuous-integration-action@v1" }, { "name": "PHPUnit [8.0, locked]", - "job": "{\"command\":\"test\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"locked\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "job": "{\"command\":\"./vendor/bin/phpunit\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"locked\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[\"xmllint --schema vendor/phpunit/phpunit/phpunit.xsd phpunit.xml.dist\"]}", "operatingSystem": "ubuntu-latest", "action": "laminas/laminas-continuous-integration-action@v1" }, { "name": "PHPUnit [8.0, latest]", - "job": "{\"command\":\"test\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"latest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "job": "{\"command\":\"./vendor/bin/phpunit\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"latest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[\"xmllint --schema vendor/phpunit/phpunit/phpunit.xsd phpunit.xml.dist\"]}", "operatingSystem": "ubuntu-latest", "action": "laminas/laminas-continuous-integration-action@v1" }, { "name": "PHPUnit [8.1, lowest]", - "job": "{\"command\":\"test\",\"php\":\"8.1\",\"extensions\":[],\"ini\":[],\"dependencies\":\"lowest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "job": "{\"command\":\"./vendor/bin/phpunit\",\"php\":\"8.1\",\"extensions\":[],\"ini\":[],\"dependencies\":\"lowest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[\"xmllint --schema vendor/phpunit/phpunit/phpunit.xsd phpunit.xml.dist\"]}", "operatingSystem": "ubuntu-latest", "action": "laminas/laminas-continuous-integration-action@v1" }, { "name": "PHPUnit [8.2, lowest]", - "job": "{\"command\":\"test\",\"php\":\"8.2\",\"extensions\":[],\"ini\":[],\"dependencies\":\"lowest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "job": "{\"command\":\"./vendor/bin/phpunit\",\"php\":\"8.2\",\"extensions\":[],\"ini\":[],\"dependencies\":\"lowest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[\"xmllint --schema vendor/phpunit/phpunit/phpunit.xsd phpunit.xml.dist\"]}", "operatingSystem": "ubuntu-latest", "action": "laminas/laminas-continuous-integration-action@v1" }, { "name": "PHPUnit [8.2, latest]", - "job": "{\"command\":\"test\",\"php\":\"8.2\",\"extensions\":[],\"ini\":[],\"dependencies\":\"latest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "job": "{\"command\":\"./vendor/bin/phpunit\",\"php\":\"8.2\",\"extensions\":[],\"ini\":[],\"dependencies\":\"latest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[\"xmllint --schema vendor/phpunit/phpunit/phpunit.xsd phpunit.xml.dist\"]}", "operatingSystem": "ubuntu-latest", "action": "laminas/laminas-continuous-integration-action@v1" } diff --git a/tests/configuration-exclude-php-specific-version/matrix.json b/tests/configuration-exclude-php-specific-version/matrix.json index 691085d4..9dd83454 100644 --- a/tests/configuration-exclude-php-specific-version/matrix.json +++ b/tests/configuration-exclude-php-specific-version/matrix.json @@ -2,31 +2,31 @@ "include": [ { "name": "PHPUnit [8.0, lowest]", - "job": "{\"command\":\"test\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"lowest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "job": "{\"command\":\"./vendor/bin/phpunit\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"lowest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[\"xmllint --schema vendor/phpunit/phpunit/phpunit.xsd phpunit.xml.dist\"]}", "operatingSystem": "ubuntu-latest", "action": "laminas/laminas-continuous-integration-action@v1" }, { "name": "PHPUnit [8.0, locked]", - "job": "{\"command\":\"test\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"locked\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "job": "{\"command\":\"./vendor/bin/phpunit\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"locked\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[\"xmllint --schema vendor/phpunit/phpunit/phpunit.xsd phpunit.xml.dist\"]}", "operatingSystem": "ubuntu-latest", "action": "laminas/laminas-continuous-integration-action@v1" }, { "name": "PHPUnit [8.0, latest]", - "job": "{\"command\":\"test\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"latest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "job": "{\"command\":\"./vendor/bin/phpunit\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"latest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[\"xmllint --schema vendor/phpunit/phpunit/phpunit.xsd phpunit.xml.dist\"]}", "operatingSystem": "ubuntu-latest", "action": "laminas/laminas-continuous-integration-action@v1" }, { "name": "PHPUnit [8.2, lowest]", - "job": "{\"command\":\"test\",\"php\":\"8.2\",\"extensions\":[],\"ini\":[],\"dependencies\":\"lowest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "job": "{\"command\":\"./vendor/bin/phpunit\",\"php\":\"8.2\",\"extensions\":[],\"ini\":[],\"dependencies\":\"lowest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[\"xmllint --schema vendor/phpunit/phpunit/phpunit.xsd phpunit.xml.dist\"]}", "operatingSystem": "ubuntu-latest", "action": "laminas/laminas-continuous-integration-action@v1" }, { "name": "PHPUnit [8.2, latest]", - "job": "{\"command\":\"test\",\"php\":\"8.2\",\"extensions\":[],\"ini\":[],\"dependencies\":\"latest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}", + "job": "{\"command\":\"./vendor/bin/phpunit\",\"php\":\"8.2\",\"extensions\":[],\"ini\":[],\"dependencies\":\"latest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[\"xmllint --schema vendor/phpunit/phpunit/phpunit.xsd phpunit.xml.dist\"]}", "operatingSystem": "ubuntu-latest", "action": "laminas/laminas-continuous-integration-action@v1" } From 2fd95ad6955cb7d839263f2e2487ffff82b8f3d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Sun, 5 May 2024 16:35:34 +0200 Subject: [PATCH 11/17] qa: normalize PHP version for schema and also ensure that `stablePHP` from `.laminas-ci.json` reflects proper PHP version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- laminas-ci.schema.json | 12 +++++++++--- src/config/app.ts | 25 ++++++++++++++++++++++--- src/config/input.ts | 2 +- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/laminas-ci.schema.json b/laminas-ci.schema.json index f6575ebe..68fedc46 100644 --- a/laminas-ci.schema.json +++ b/laminas-ci.schema.json @@ -248,9 +248,9 @@ } ], "definitions": { - "php": { + "installablePhpVersion": { "type": "string", - "title": "The php version", + "title": "Installable PHP versions from available from within the container.", "enum": [ "5.6", "7.0", @@ -262,8 +262,14 @@ "8.1", "8.2", "8.3", + "@default" + ] + }, + "php": { + "$ref": "#/definitions/installablePhpVersion", + "title": "The PHP version", + "enum": [ "*", - "@default", "@latest", "@lowest" ] diff --git a/src/config/app.ts b/src/config/app.ts index b8046107..12005b8d 100644 --- a/src/config/app.ts +++ b/src/config/app.ts @@ -3,9 +3,28 @@ import semver from 'semver'; import parseJsonFile from '../json'; import {isToolRunningContainerDefaultPhpVersion, Tool, ToolExecutionType} from '../tools'; import {Logger} from '../logging'; -import {CURRENT_STABLE, INSTALLABLE_VERSIONS, InstallablePhpVersionType, isInstallableVersion} from './php'; +import { + CONTAINER_DEFAULT_PHP_VERSION, + CURRENT_STABLE, + INSTALLABLE_VERSIONS, + InstallablePhpVersionType, + isInstallableVersion +} from './php'; import {ComposerJson} from './composer'; -import {ConfigurationFromFile, isAdditionalChecksConfiguration, isAnyComposerDependencySet, isAnyPhpVersionType, isConfigurationContainingJobExclusions, isExplicitChecksConfiguration, isLatestPhpVersionType, isLowestPhpVersionType, JobDefinitionFromFile, JobFromFile, JobToExcludeFromFile, WILDCARD_ALIAS} from './input'; +import { + ConfigurationFromFile, + isAdditionalChecksConfiguration, + isAnyComposerDependencySet, + isAnyPhpVersionType, + isConfigurationContainingJobExclusions, + isExplicitChecksConfiguration, + isLatestPhpVersionType, + isLowestPhpVersionType, + JobDefinitionFromFile, + JobFromFile, + JobToExcludeFromFile, + WILDCARD_ALIAS +} from './input'; export const OPERATING_SYSTEM = 'ubuntu-latest'; export const ACTION = 'laminas/laminas-continuous-integration-action@v1'; @@ -447,7 +466,7 @@ function createNoOpCheck(config: Config): Job { operatingSystem : OPERATING_SYSTEM, action : ACTION, job : { - php : config.stablePhpVersion, + php : CONTAINER_DEFAULT_PHP_VERSION, phpExtensions : [], command : '', composerDependencySet : ComposerDependencySet.LOCKED, diff --git a/src/config/input.ts b/src/config/input.ts index 3d50658b..02958cc7 100644 --- a/src/config/input.ts +++ b/src/config/input.ts @@ -11,7 +11,7 @@ export interface ConfigurationFromFile { extensions?: string[]; ini?: string[]; ignore_php_platform_requirements?: IgnorePhpPlatformRequirements; - stablePHP?: string; + stablePHP?: InstallablePhpVersionType; additional_composer_arguments?: string[]; backwardCompatibilityCheck?: boolean; } From 319a1b3adbad703988b9fb1edb7bfd6273a34354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Sun, 5 May 2024 16:44:50 +0200 Subject: [PATCH 12/17] qa: target `stablePHP` to `installablePhpVersion` definition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stable PHP should represent an actual PHP version and thus `lowest` and `latest` or even wildcard references make no sense. Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- laminas-ci.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laminas-ci.schema.json b/laminas-ci.schema.json index 68fedc46..fc40858a 100644 --- a/laminas-ci.schema.json +++ b/laminas-ci.schema.json @@ -385,7 +385,7 @@ } }, "stablePHP": { - "$ref": "#/definitions/php", + "$ref": "#/definitions/installablePhpVersion", "title": "The PHP version to be used for stable checks", "description": "This PHP version is used for all QA check jobs. The default depends on the `composer.json` of the project and usually reflects the minimum supported PHP version of that project.", "default": "8.0" From 40699f0f6a48a77603b360969b7776961a647d9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Sun, 5 May 2024 16:49:08 +0200 Subject: [PATCH 13/17] bugfix: use `allOf` to merge `installablePhpVersion` enum values with `php` enum values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- laminas-ci.schema.json | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/laminas-ci.schema.json b/laminas-ci.schema.json index fc40858a..d806053f 100644 --- a/laminas-ci.schema.json +++ b/laminas-ci.schema.json @@ -268,10 +268,16 @@ "php": { "$ref": "#/definitions/installablePhpVersion", "title": "The PHP version", - "enum": [ - "*", - "@latest", - "@lowest" + "type": "string", + "allOf": [ + { "$ref": "#/definitions/installablePhpVersion" }, + { + "enum": [ + "*", + "@latest", + "@lowest" + ] + } ] }, "extensions": { From 9f5c287976c4518a4c857311304bdfc66ff08b1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Sun, 5 May 2024 16:54:45 +0200 Subject: [PATCH 14/17] bugfix: use `anyOf` of `php` as just one of the `enum` values have to match, not `all` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- laminas-ci.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laminas-ci.schema.json b/laminas-ci.schema.json index d806053f..5dae1b12 100644 --- a/laminas-ci.schema.json +++ b/laminas-ci.schema.json @@ -269,7 +269,7 @@ "$ref": "#/definitions/installablePhpVersion", "title": "The PHP version", "type": "string", - "allOf": [ + "anyOf": [ { "$ref": "#/definitions/installablePhpVersion" }, { "enum": [ From 7f557d27cdfde9785e690bc02f4fa37411ae15f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Sun, 5 May 2024 17:18:40 +0200 Subject: [PATCH 15/17] bugfix: use `anyOf` to reference enum from `installablePhpVersion` and `php` specific enum strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- laminas-ci.schema.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/laminas-ci.schema.json b/laminas-ci.schema.json index 5dae1b12..ae18f86d 100644 --- a/laminas-ci.schema.json +++ b/laminas-ci.schema.json @@ -266,11 +266,12 @@ ] }, "php": { - "$ref": "#/definitions/installablePhpVersion", "title": "The PHP version", "type": "string", "anyOf": [ - { "$ref": "#/definitions/installablePhpVersion" }, + { + "$ref": "#/definitions/installablePhpVersion" + }, { "enum": [ "*", From 4737d09296cf0939b963800760f6a0a693a49752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Sun, 5 May 2024 19:46:32 +0200 Subject: [PATCH 16/17] qa: use `@default` for `no-checks` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- tests/no-checks-due-to-diff/matrix.json | 2 +- tests/no-checks/matrix.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/no-checks-due-to-diff/matrix.json b/tests/no-checks-due-to-diff/matrix.json index c056da11..b056b800 100644 --- a/tests/no-checks-due-to-diff/matrix.json +++ b/tests/no-checks-due-to-diff/matrix.json @@ -2,7 +2,7 @@ "include": [ { "name": "No checks", - "job": "{\"command\":\"\",\"php\":\"7.4\",\"extensions\":[],\"ini\":[],\"dependencies\":\"locked\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[]}", + "job": "{\"command\":\"\",\"php\":\"@default\",\"extensions\":[],\"ini\":[],\"dependencies\":\"locked\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[]}", "operatingSystem": "ubuntu-latest", "action": "laminas/laminas-continuous-integration-action@v1" } diff --git a/tests/no-checks/matrix.json b/tests/no-checks/matrix.json index c056da11..b056b800 100644 --- a/tests/no-checks/matrix.json +++ b/tests/no-checks/matrix.json @@ -2,7 +2,7 @@ "include": [ { "name": "No checks", - "job": "{\"command\":\"\",\"php\":\"7.4\",\"extensions\":[],\"ini\":[],\"dependencies\":\"locked\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[]}", + "job": "{\"command\":\"\",\"php\":\"@default\",\"extensions\":[],\"ini\":[],\"dependencies\":\"locked\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[]}", "operatingSystem": "ubuntu-latest", "action": "laminas/laminas-continuous-integration-action@v1" } From 64b9e8b3fdacab9aa9aa181cd3e635c44a113700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Sun, 5 May 2024 20:02:23 +0200 Subject: [PATCH 17/17] qa: remove `locked` dependency from expected matrix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Due to the fact that there is no `composer.lock` file available, the matrix will not generate any `locked` jobs. Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- .../matrix.json | 6 ------ .../configuration-exclude-php-specific-version/matrix.json | 6 ------ 2 files changed, 12 deletions(-) diff --git a/tests/configuration-exclude-php-dependency-combination/matrix.json b/tests/configuration-exclude-php-dependency-combination/matrix.json index b57750b3..03c77801 100644 --- a/tests/configuration-exclude-php-dependency-combination/matrix.json +++ b/tests/configuration-exclude-php-dependency-combination/matrix.json @@ -6,12 +6,6 @@ "operatingSystem": "ubuntu-latest", "action": "laminas/laminas-continuous-integration-action@v1" }, - { - "name": "PHPUnit [8.0, locked]", - "job": "{\"command\":\"./vendor/bin/phpunit\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"locked\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[\"xmllint --schema vendor/phpunit/phpunit/phpunit.xsd phpunit.xml.dist\"]}", - "operatingSystem": "ubuntu-latest", - "action": "laminas/laminas-continuous-integration-action@v1" - }, { "name": "PHPUnit [8.0, latest]", "job": "{\"command\":\"./vendor/bin/phpunit\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"latest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[\"xmllint --schema vendor/phpunit/phpunit/phpunit.xsd phpunit.xml.dist\"]}", diff --git a/tests/configuration-exclude-php-specific-version/matrix.json b/tests/configuration-exclude-php-specific-version/matrix.json index 9dd83454..2cc70bf9 100644 --- a/tests/configuration-exclude-php-specific-version/matrix.json +++ b/tests/configuration-exclude-php-specific-version/matrix.json @@ -6,12 +6,6 @@ "operatingSystem": "ubuntu-latest", "action": "laminas/laminas-continuous-integration-action@v1" }, - { - "name": "PHPUnit [8.0, locked]", - "job": "{\"command\":\"./vendor/bin/phpunit\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"locked\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[\"xmllint --schema vendor/phpunit/phpunit/phpunit.xsd phpunit.xml.dist\"]}", - "operatingSystem": "ubuntu-latest", - "action": "laminas/laminas-continuous-integration-action@v1" - }, { "name": "PHPUnit [8.0, latest]", "job": "{\"command\":\"./vendor/bin/phpunit\",\"php\":\"8.0\",\"extensions\":[],\"ini\":[],\"dependencies\":\"latest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[\"xmllint --schema vendor/phpunit/phpunit/phpunit.xsd phpunit.xml.dist\"]}",