diff --git a/laminas-ci.schema.json b/laminas-ci.schema.json index 5cf3736d..930d34a5 100644 --- a/laminas-ci.schema.json +++ b/laminas-ci.schema.json @@ -24,7 +24,7 @@ ], "exclude": [ { - "name": "Codeception [8.2, latest]" + "name": "Codeception [8.2, lowest]" } ], "ignore_php_platform_requirements": { @@ -281,7 +281,7 @@ "examples": [ [ { - "name": "Codeception [8.2, latest]" + "name": "Codeception [8.2, lowest]" } ] ], @@ -290,7 +290,7 @@ "title": "The job description to be excluded", "examples": [ { - "name": "Codeception [8.2, latest]" + "name": "Codeception [8.2, lowest]" } ], "required": [ @@ -303,7 +303,7 @@ "description": "The name of the job to be excluded. Must be an exact match.", "minLength": 1, "examples": [ - "Codeception [8.2, latest]" + "Codeception [8.2, lowest]" ] } }, @@ -368,7 +368,7 @@ "type": "string", "enum": ["latest", "lowest", "locked", "*"], "title": "The composer dependencies to be used", - "description": "The composer dependencies to be used. If the wildcard `*` is passed, a list of checks is created containing each `lowest` and `latest` composer dependencies.", + "description": "The composer dependencies to be used. If the wildcard `*` is passed, a list of checks is created containing each `lowest` and `locked` composer dependencies.", "default": "locked" }, "command": { diff --git a/src/config/app.ts b/src/config/app.ts index 18735767..e277c52a 100644 --- a/src/config/app.ts +++ b/src/config/app.ts @@ -13,7 +13,6 @@ export const ACTION = 'laminas/laminas-continuous-integration-action@v1'; export enum ComposerDependencySet { LOWEST = 'lowest', LOCKED = 'locked', - LATEST = 'latest', } export function gatherVersions(composerJson: ComposerJson): InstallablePhpVersionType[] { @@ -111,10 +110,10 @@ function discoverPhpVersionsForJob(job: JobDefinitionFromFile, config: Config): function discoverComposerDependencySetsForJob(job: JobDefinitionFromFile, config: Config): ComposerDependencySet[] { const dependencySetFromConfig = job.dependencies - ?? (config.lockedDependenciesExists ? ComposerDependencySet.LOCKED : ComposerDependencySet.LATEST); + ?? (config.lockedDependenciesExists ? ComposerDependencySet.LOCKED : ComposerDependencySet.LOWEST); if (isAnyComposerDependencySet(dependencySetFromConfig)) { - return [ ComposerDependencySet.LOWEST, ComposerDependencySet.LATEST ]; + return [ ComposerDependencySet.LOWEST ]; } return [ dependencySetFromConfig ]; @@ -295,7 +294,7 @@ function createJobsForTool( if (tool.executionType === ToolExecutionType.STATIC) { const lockedOrLatestDependencySet: ComposerDependencySet = config.lockedDependenciesExists ? ComposerDependencySet.LOCKED - : ComposerDependencySet.LATEST; + : ComposerDependencySet.LOWEST; return [ createJob( @@ -343,18 +342,7 @@ function createJobsForTool( config.ignorePhpPlatformRequirements[version] ?? false, config.additionalComposerArguments, beforeScript, - ), tool) as JobFromTool, - - createJob(tool.name, createJobDefinition( - tool.command, - version, - ComposerDependencySet.LATEST, - config.phpExtensions, - config.phpIni, - config.ignorePhpPlatformRequirements[version] ?? false, - config.additionalComposerArguments, - beforeScript, - ), tool) as JobFromTool, + ), tool) as JobFromTool )); } diff --git a/tests/configuration-explicit-job-latest-dependency-set/.laminas-ci.json b/tests/configuration-explicit-job-latest-dependency-set/.laminas-ci.json new file mode 100644 index 00000000..d6a34c61 --- /dev/null +++ b/tests/configuration-explicit-job-latest-dependency-set/.laminas-ci.json @@ -0,0 +1,12 @@ +{ + "checks": [ + { + "name": "Whatever Check", + "job": { + "php": "8.1", + "dependencies": "latest", + "command": "test" + } + } + ] +} diff --git a/tests/configuration-explicit-job-latest-dependency-set/composer.json b/tests/configuration-explicit-job-latest-dependency-set/composer.json new file mode 100644 index 00000000..fb4d5cbe --- /dev/null +++ b/tests/configuration-explicit-job-latest-dependency-set/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "php": "~7.4.0 || ~8.0.0" + } +} diff --git a/tests/configuration-explicit-job-latest-dependency-set/matrix.json b/tests/configuration-explicit-job-latest-dependency-set/matrix.json new file mode 100644 index 00000000..5b260ab2 --- /dev/null +++ b/tests/configuration-explicit-job-latest-dependency-set/matrix.json @@ -0,0 +1,10 @@ +{ + "include": [ + { + "name": "Whatever Check [8.1, latest]", + "job": "{\"command\":\"test\",\"php\":\"8.1\",\"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" + } + ] +}