From 3b1bd5ba858e7489530b472e28d043027a85a909 Mon Sep 17 00:00:00 2001 From: mettelilienthal <108519172+mettelilienthal@users.noreply.github.com> Date: Thu, 12 Sep 2024 09:14:43 +0200 Subject: [PATCH 1/5] update validate-json.yaml This should improve the json validation display by showing where the error is by line and column --- .github/workflows/validate-json.yaml | 73 ++++++++++++++-------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/.github/workflows/validate-json.yaml b/.github/workflows/validate-json.yaml index 77f4b085..477fe1f7 100644 --- a/.github/workflows/validate-json.yaml +++ b/.github/workflows/validate-json.yaml @@ -1,37 +1,36 @@ -# Validate JSON schema files -# Source: https://github.com/nhalstead/validate-json-action -# Forked from: https://github.com/marketplace/actions/validate-json -name: Validate JSON schemas for assets and materials - -on: - pull_request: - paths: - - 'examples/**' - - 'schemas/**' - -jobs: - json-schema-validation: - name: JSON schema validation - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - - name: Validate asset JSON schemas - uses: nhalstead/validate-json-action@0.1.3 - with: - schema: ./schemas/asset_schema.json - jsons: ./examples/*.xoma - - - name: Validate material JSON schemas - uses: nhalstead/validate-json-action@0.1.3 - with: - schema: ./schemas/material_schema.json - jsons: ./examples/*.xomp - - - name: Validate electromagnetic material properties JSON schemas - uses: nhalstead/validate-json-action@0.1.3 - with: - schema: ./schemas/material_emp_schema.json - jsons: ./examples/*_emp.xompt - \ No newline at end of file +# Validate JSON schema files +# Source: https://github.com/GrantBirki/json-yaml-validate +# Forked from: https://github.com/marketplace/actions/json-yaml-validate +name: Validate JSON schemas for assets and materials + +on: + pull_request: + paths: + - 'examples/**' + - 'schemas/**' + +jobs: + json-yaml-validate: + name: JSON schema validation + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Validate asset JSON schemas + uses: GrantBirki/json-yaml-validate@v3.2.1 + with: + files: ./examples/*.xoma + json_schema: ./schemas/asset_schema.json + + - name: Validate material JSON schemas + uses: GrantBirki/json-yaml-validate@v3.2.1 + with: + files: ./examples/*.xomp + json_schema: ./schemas/material_schema.json + + - name: Validate electromagnetic material properties JSON schemas + uses: GrantBirki/json-yaml-validate@v3.2.1 + with: + files: ./examples/*_emp.xompt + json_schema: ./schemas/material_emp_schema.json \ No newline at end of file From d6976b399ca3455a7d5410ac7e9be093d309aafe Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 12 Sep 2024 10:48:35 +0200 Subject: [PATCH 2/5] Add error to test validation pipeline Signed-off-by: ClemensLinnhoff --- examples/example_asset.xoma | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/example_asset.xoma b/examples/example_asset.xoma index 190a80a3..e67e6e35 100644 --- a/examples/example_asset.xoma +++ b/examples/example_asset.xoma @@ -21,7 +21,7 @@ "texture_resolutions": ["2K"], "normal_map_format": "OpenGL", "bounding_box": { - "x" : [-2.5, 2.5], + "x" : [-2.5, 2.5, "y" : [-1.1, 1.1], "z" : [0.0, 1.5] } From f23071a1a8c074783e96a02618a3bce896620085 Mon Sep 17 00:00:00 2001 From: mettelilienthal <108519172+mettelilienthal@users.noreply.github.com> Date: Fri, 13 Sep 2024 13:47:50 +0200 Subject: [PATCH 3/5] Updated validate-json.yaml removed unnecessary yaml validation --- .github/workflows/validate-json.yaml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/validate-json.yaml b/.github/workflows/validate-json.yaml index 477fe1f7..6f30703a 100644 --- a/.github/workflows/validate-json.yaml +++ b/.github/workflows/validate-json.yaml @@ -1,6 +1,6 @@ # Validate JSON schema files -# Source: https://github.com/GrantBirki/json-yaml-validate -# Forked from: https://github.com/marketplace/actions/json-yaml-validate +# Source: https://github.com/dsanders11/json-schema-validate-action +# Forked from: https://github.com/marketplace/actions/json-schema-validate name: Validate JSON schemas for assets and materials on: @@ -10,27 +10,28 @@ on: - 'schemas/**' jobs: - json-yaml-validate: + validate-github-actions-workflows: name: JSON schema validation runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout files + uses: actions/checkout@v1 - name: Validate asset JSON schemas - uses: GrantBirki/json-yaml-validate@v3.2.1 + uses: dsanders11/json-schema-validate-action@v1.2.0 with: - files: ./examples/*.xoma - json_schema: ./schemas/asset_schema.json + schema: ./schemas/asset_schema.json + files: ./examples/*.xoma - name: Validate material JSON schemas - uses: GrantBirki/json-yaml-validate@v3.2.1 + uses: dsanders11/json-schema-validate-action@v1.2.0 with: + schema: ./schemas/material_schema.json files: ./examples/*.xomp - json_schema: ./schemas/material_schema.json - name: Validate electromagnetic material properties JSON schemas - uses: GrantBirki/json-yaml-validate@v3.2.1 + uses: dsanders11/json-schema-validate-action@v1.2.0 with: + schema: ./schemas/material_emp_schema.json files: ./examples/*_emp.xompt - json_schema: ./schemas/material_emp_schema.json \ No newline at end of file From 15f01c3ffbc6ce841b6b76b0d24d228e83c30ef2 Mon Sep 17 00:00:00 2001 From: Martin Fiebig Date: Thu, 19 Sep 2024 11:00:36 +0200 Subject: [PATCH 4/5] updated validate-json.yaml to implement different github action Signed-off-by: Martin Fiebig --- .github/workflows/validate-json.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/validate-json.yaml b/.github/workflows/validate-json.yaml index 6f30703a..2c96fb26 100644 --- a/.github/workflows/validate-json.yaml +++ b/.github/workflows/validate-json.yaml @@ -1,6 +1,6 @@ # Validate JSON schema files -# Source: https://github.com/dsanders11/json-schema-validate-action -# Forked from: https://github.com/marketplace/actions/json-schema-validate +# Source: https://github.com/cardinalby/schema-validator-action +# Forked from: https://github.com/marketplace/actions/schema-validation-action name: Validate JSON schemas for assets and materials on: @@ -19,19 +19,19 @@ jobs: uses: actions/checkout@v1 - name: Validate asset JSON schemas - uses: dsanders11/json-schema-validate-action@v1.2.0 + uses: cardinalby/schema-validator-action@v3 with: - schema: ./schemas/asset_schema.json - files: ./examples/*.xoma + schema: ./schemas/asset_schema.json + file: ./examples/*.xoma - name: Validate material JSON schemas - uses: dsanders11/json-schema-validate-action@v1.2.0 + uses: cardinalby/schema-validator-action@v3 with: schema: ./schemas/material_schema.json - files: ./examples/*.xomp + file: ./examples/*.xomp - name: Validate electromagnetic material properties JSON schemas - uses: dsanders11/json-schema-validate-action@v1.2.0 + uses: cardinalby/schema-validator-action@v3 with: schema: ./schemas/material_emp_schema.json - files: ./examples/*_emp.xompt + file: ./examples/*_emp.xompt From 9fddc0e2fbef2803c26d2c1dfce49c7347745253 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 19 Sep 2024 11:49:03 +0200 Subject: [PATCH 5/5] Fix test error Signed-off-by: ClemensLinnhoff --- examples/example_asset.xoma | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/example_asset.xoma b/examples/example_asset.xoma index e67e6e35..190a80a3 100644 --- a/examples/example_asset.xoma +++ b/examples/example_asset.xoma @@ -21,7 +21,7 @@ "texture_resolutions": ["2K"], "normal_map_format": "OpenGL", "bounding_box": { - "x" : [-2.5, 2.5, + "x" : [-2.5, 2.5], "y" : [-1.1, 1.1], "z" : [0.0, 1.5] }