also generate full matrix

This commit is contained in:
Robin Appelman 2023-11-10 17:14:56 +01:00
commit d594a6929d
4 changed files with 47 additions and 6 deletions

17
dist/index.js vendored
View file

@ -42656,10 +42656,20 @@ function copy(obj) {
phpMatrix.forEach(row => {
const php = row['php-versions'];
const candidateVersion = versionData.findLast(data => data.phpMin <= php && data.phpMax >= php);
console.log(php, candidateVersion);
row["server-versions"] = candidateVersion.branch;
});
// matrix with every php and server combination
const fullMatrix = cartesianProduct({
"server-versions": versionData.map(data => data.branch),
"php-versions": php,
...matrixInput
}).filter(row => {
const php = row['php-versions'];
const version = versionData.find(version => version.branch === row['server-versions']);
return version.phpMin <= php && version.phpMax >= php;
});
// matrix with at least one item for every server and php version
let testMatrix = phpMatrix.concat(serverMatrix).filter(onlyUnique);
@ -42682,9 +42692,12 @@ function copy(obj) {
core.setOutput("matrix", JSON.stringify({
include: serverMatrix
}));
core.setOutput("test-matrix", JSON.stringify({
core.setOutput("sparse-matrix", JSON.stringify({
include: testMatrix
}));
core.setOutput("full-matrix", JSON.stringify({
include: fullMatrix
}));
core.setOutput("ocp-matrix", JSON.stringify({
include: serverMatrix.map(row => {