Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
yceballost committed Aug 5, 2024
1 parent 21bfc19 commit 76e7900
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 4 deletions.
51 changes: 50 additions & 1 deletion .github/workflows/schema-validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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"
}
2 changes: 1 addition & 1 deletion tokens/o2.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"backgroundBrandSecondary": {
"value": "{palette.o2BluePrimary}",
"type": "color",
"description": "o2BluePrimary"
"description": "o2BluePrimar"
},
"backgroundContainer": {
"value": "{palette.white}",
Expand Down
3 changes: 2 additions & 1 deletion tokens/schema/patterns/movistar-pattern.json
Original file line number Diff line number Diff line change
@@ -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)+$"
}
}
}
2 changes: 1 addition & 1 deletion tokens/tu.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"backgroundContainerError": {
"value": "{palette.red10}",
"type": "color",
"description": "red10"
"description": "red0"
},
"backgroundContainerHover": {
"value": "rgba({palette.grey9}, 0.03)",
Expand Down

0 comments on commit 76e7900

Please sign in to comment.