From 76e7900a8cb413c55b72888f75e74028f4c2c163 Mon Sep 17 00:00:00 2001 From: Yayo Date: Mon, 5 Aug 2024 14:47:05 +0200 Subject: [PATCH] test --- .github/workflows/schema-validator.yml | 51 +++++++++++++++++++- tokens/o2.json | 2 +- tokens/schema/patterns/movistar-pattern.json | 3 +- tokens/tu.json | 2 +- 4 files changed, 54 insertions(+), 4 deletions(-) diff --git a/.github/workflows/schema-validator.yml b/.github/workflows/schema-validator.yml index e4f0e5f667..57e07d74a0 100644 --- a/.github/workflows/schema-validator.yml +++ b/.github/workflows/schema-validator.yml @@ -22,7 +22,11 @@ jobs: with: file: "tokens/movistar.json" schema: "tokens/schema/skin-schema.json" - refSchemasArray: "[patterns/movistar-pattern.json]" + mode: "lax" + refSchemasMap: > + { + "tokens/schema/skin-schema.json": "tokens/schema/patterns/movistar-pattern.json" + } O2: runs-on: ubuntu-latest @@ -33,6 +37,11 @@ jobs: with: file: "tokens/o2.json" schema: "tokens/schema/skin-schema.json" + mode: "lax" + refSchemasMap: > + { + "tokens/schema/skin-schema.json": "tokens/schema/patterns/o2-pattern.json" + } O2-new: runs-on: ubuntu-latest @@ -43,6 +52,11 @@ jobs: with: file: "tokens/o2-new.json" schema: "tokens/schema/skin-schema.json" + mode: "lax" + refSchemasMap: > + { + "tokens/schema/skin-schema.json": "tokens/schema/patterns/o2-new-pattern.json" + } Vivo: runs-on: ubuntu-latest @@ -53,6 +67,11 @@ jobs: with: file: "tokens/vivo.json" schema: "tokens/schema/skin-schema.json" + mode: "lax" + refSchemasMap: > + { + "tokens/schema/skin-schema.json": "tokens/schema/patterns/vivo-pattern.json" + } Vivo-new: runs-on: ubuntu-latest @@ -63,6 +82,11 @@ jobs: with: file: "tokens/vivo-new.json" schema: "tokens/schema/skin-schema.json" + mode: "lax" + refSchemasMap: > + { + "tokens/schema/skin-schema.json": "tokens/schema/patterns/vivo-new-pattern.json" + } Telefonica: runs-on: ubuntu-latest @@ -73,6 +97,11 @@ jobs: with: file: "tokens/telefonica.json" schema: "tokens/schema/skin-schema.json" + mode: "lax" + refSchemasMap: > + { + "tokens/schema/skin-schema.json": "tokens/schema/patterns/telefonica-pattern.json" + } Blau: runs-on: ubuntu-latest @@ -83,3 +112,23 @@ jobs: with: file: "tokens/blau.json" schema: "tokens/schema/skin-schema.json" + mode: "lax" + refSchemasMap: > + { + "tokens/schema/skin-schema.json": "tokens/schema/patterns/blau-pattern.json" + } + + TU: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Validate action.yml against a remote schema + uses: cardinalby/schema-validator-action@v3 + with: + file: "tokens/tu.json" + schema: "tokens/schema/skin-schema.json" + mode: "spec" + refSchemasMap: > + { + "tokens/schema/skin-schema.json": "tokens/schema/patterns/tu-pattern.json" + } diff --git a/tokens/o2.json b/tokens/o2.json index ee44cd4d34..c13ae63f43 100644 --- a/tokens/o2.json +++ b/tokens/o2.json @@ -18,7 +18,7 @@ "backgroundBrandSecondary": { "value": "{palette.o2BluePrimary}", "type": "color", - "description": "o2BluePrimary" + "description": "o2BluePrimar" }, "backgroundContainer": { "value": "{palette.white}", diff --git a/tokens/schema/patterns/movistar-pattern.json b/tokens/schema/patterns/movistar-pattern.json index 6c0df4cbe7..129359e0eb 100644 --- a/tokens/schema/patterns/movistar-pattern.json +++ b/tokens/schema/patterns/movistar-pattern.json @@ -1,8 +1,9 @@ { + "$schema": "http://json-schema.org/draft-07/schema#", "colorPattern": { "pattern": "(.*?rgba.*?)+([({])+(palette.(movistarBlue|movistarBlue10|movistarBlue15|movistarBlue20|movistarBlue30|movistarBlue40|movistarBlue55|movistarBlueHC|movistarBlueHC55|movistarBlueHC65|movistarGreen|movistarGreen10|movistarGreen30|movistarGreen40|movistarGreen55|movistarGreen60|movistarGreen70|pepper|pepper10|pepper40|pepper45|pepper55|pepper60|pepper65|pepper70|egg|egg10|egg40|egg55|egg80|pink|pink45|pink55|purple|purple10|purple35|purple40|purple70|grey1|grey2|grey3|grey4|grey5|grey6|white|black|movistarBlueDark|darkModeBlack|darkModeGrey|darkModeGrey2|darkModeGrey3|darkModeGrey4|darkModeGrey5|darkModeGrey6|darkModeGrey7)}, (0+([.][0-9]+)?|1([.]0)?)[)])$|^({palette.(movistarBlue|movistarBlue10|movistarBlue15|movistarBlue20|movistarBlue30|movistarBlue40|movistarBlue55|movistarBlueHC|movistarBlueHC55|movistarBlueHC65|movistarGreen|movistarGreen10|movistarGreen30|movistarGreen40|movistarGreen55|movistarGreen60|movistarGreen70|pepper|pepper10|pepper40|pepper45|pepper55|pepper60|pepper65|pepper70|egg|egg10|egg40|egg55|egg80|pink|pink45|pink55|purple|purple10|purple35|purple40|purple70|grey1|grey2|grey3|grey4|grey5|grey6|white|black|movistarBlueDark|darkModeBlack|darkModeGrey|darkModeGrey2|darkModeGrey3|darkModeGrey4|darkModeGrey5|darkModeGrey6|darkModeGrey7)+})$|(.*?linear-gradient.*?)+([(])(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(.*?deg).*[)]$" }, "descriptionPattern": { "pattern": "^(movistarBlue|movistarBlue10|movistarBlue15|movistarBlue20|movistarBlue30|movistarBlue40|movistarBlue55|movistarBlueHC|movistarBlueHC55|movistarBlueHC65|movistarGreen|movistarGreen10|movistarGreen30|movistarGreen40|movistarGreen55|movistarGreen60|movistarGreen70|pepper|pepper10|pepper40|pepper45|pepper55|pepper60|pepper65|pepper70|egg|egg10|egg40|egg55|egg80|pink|pink45|pink55|purple|purple10|purple35|purple40|purple70|grey1|grey2|grey3|grey4|grey5|grey6|white|black|movistarBlueDark|darkModeBlack|darkModeGrey|darkModeGrey2|darkModeGrey3|darkModeGrey4|darkModeGrey5|darkModeGrey6|darkModeGrey7)+$" } -} \ No newline at end of file +} diff --git a/tokens/tu.json b/tokens/tu.json index 8a49103f4f..6ad31f6fe1 100644 --- a/tokens/tu.json +++ b/tokens/tu.json @@ -18,7 +18,7 @@ "backgroundContainerError": { "value": "{palette.red10}", "type": "color", - "description": "red10" + "description": "red0" }, "backgroundContainerHover": { "value": "rgba({palette.grey9}, 0.03)",