-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(json-schema-check): add new action (#240)
* feat(json-schema-check): add new action The goal is to check the compliance of configuration files against their Schema template. Leveraging the check-jsonschema CLI tool. Issue-Id: SCM-6366 Signed-off-by: Ambroise Vincent <[email protected]> Change-Id: I3ca864e58d408e85ed049266c3e703b8a19220b9 * Update json-schema-check/README.md * Update README.md --------- Signed-off-by: Ambroise Vincent <[email protected]> Co-authored-by: Kenji Miyake <[email protected]>
- Loading branch information
1 parent
73d6852
commit 92ca968
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# json-schema-check | ||
|
||
## Description | ||
|
||
This action checks if the ROS 2 parameter files (`config/*.param.yaml`) of packages comply with the format of their template JSON Schema file (`schema/*.schema.json`). | ||
|
||
## Usage | ||
|
||
```yaml | ||
jobs: | ||
json-schema-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Run json-schema-check | ||
uses: autowarefoundation/autoware-github-actions/json-schema-check@v1 | ||
``` | ||
## Inputs | ||
None. | ||
## Outputs | ||
None. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: json-schema-check | ||
description: "" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install JSON Schema packages | ||
run: | | ||
pip3 install -U check-jsonschema | ||
shell: bash | ||
|
||
- name: Check configuration files | ||
run: | | ||
find -wholename '*/schema/*.schema.json' -execdir bash -c 'check-jsonschema --schemafile "$1" ../config/*.param.yaml' bash '{}' + | ||
shell: bash |