mirror of
https://github.com/icewind1991/nextcloud-version-matrix.git
synced 2026-06-03 09:34:12 +02:00
also generate full matrix
This commit is contained in:
parent
b706b8d35f
commit
d594a6929d
4 changed files with 47 additions and 6 deletions
11
README.md
11
README.md
|
|
@ -15,7 +15,16 @@ Get a version matrix of server versions to test the app against
|
|||
|
||||
### `matrix`
|
||||
|
||||
Test matrix with server branch and php version
|
||||
Test matrix covering all server versions
|
||||
### `php-matrix`
|
||||
|
||||
Test matrix covering all php versions
|
||||
### `sparse-matrix`
|
||||
|
||||
Test matrix covering all php and server versions with minimal redundancy
|
||||
### `full-matrix`
|
||||
|
||||
Test matrix covering all php and server version combinations
|
||||
|
||||
### `versions`
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,13 @@ inputs:
|
|||
default: '{}'
|
||||
outputs:
|
||||
matrix:
|
||||
description: 'Test matrix with server branch and php version'
|
||||
description: 'Test matrix covering all server versions'
|
||||
php-matrix:
|
||||
description: 'Test matrix covering all php versions'
|
||||
sparse-matrix:
|
||||
description: 'Test matrix covering all php and server versions with minimal redundancy'
|
||||
full-matrix:
|
||||
description: 'Test matrix covering all php and server version combinations'
|
||||
versions:
|
||||
description: 'List of supported nextcloud versions'
|
||||
branches:
|
||||
|
|
|
|||
17
dist/index.js
vendored
17
dist/index.js
vendored
|
|
@ -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 => {
|
||||
|
|
|
|||
|
|
@ -150,10 +150,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);
|
||||
|
||||
|
|
@ -176,9 +186,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 => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue