mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-13 13:14:53 +00:00
feat(supported-version): add all kind (#36)
This commit is contained in:
@@ -5,6 +5,7 @@ export const KNOWN_KINDS = {
|
||||
'currently-supported': true,
|
||||
'latest': true,
|
||||
'custom': true,
|
||||
'all': true,
|
||||
}
|
||||
|
||||
export const isValidKind = (kind: string): boolean => {
|
||||
|
||||
@@ -15,6 +15,13 @@ describe('getMatrixForKind', () => {
|
||||
expect(result.include).toBeDefined();
|
||||
});
|
||||
|
||||
it('returns a matrix for `all`', () => {
|
||||
const result = getMatrixForKind("all");
|
||||
|
||||
expect(result.magento).toBeDefined();
|
||||
expect(result.include).toBeDefined();
|
||||
});
|
||||
|
||||
it('returns a matrix for valid `custom`', () => {
|
||||
const result = getMatrixForKind("custom", "magento/project-community-edition:2.3.7-p3");
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import { getMatrixForVersions } from "./get-matrix-for-versions";
|
||||
|
||||
import latestJson from '../kind/latest.json';
|
||||
import currentlySupportedJson from '../kind/currently-supported.json';
|
||||
import allVersions from '../versions/individual.json';
|
||||
|
||||
export const getMatrixForKind = (kind: string, versions: string = "") => {
|
||||
switch(kind){
|
||||
@@ -9,6 +10,8 @@ export const getMatrixForKind = (kind: string, versions: string = "") => {
|
||||
return getMatrixForVersions(latestJson);
|
||||
case 'currently-supported':
|
||||
return getMatrixForVersions(currentlySupportedJson);
|
||||
case 'all':
|
||||
return getMatrixForVersions(Object.keys(allVersions));
|
||||
case 'custom':
|
||||
return getMatrixForVersions(versions.split(","))
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user