-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GitHub Actions to validate schemas #54
Add GitHub Actions to validate schemas #54
Conversation
.github/workflows/test.yml
Outdated
with: | ||
python-version: '3.x' | ||
- name: Install jsonschema | ||
run: pip install jsonschema==3.2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't manage to run this using the latest jsonschema version on my machine or on GitHub Actions
Looking at releases and issues it seems like the v4 is not mature enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used a straightforward pip install
here instead of adding a requirements.txt
etc. Let me know if you're okay with that.
Hi @AntoineAugusti, thanks for this contribution! |
.github/workflows/test.yml
Outdated
- name: Install jsonschema | ||
run: pip install jsonschema==3.2.0 | ||
- run: | | ||
for i in *.json; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might work with the new repo structure if this line is changed to
for i in **/*.json; do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in 2a30b2c
change the logic to have this action forking with current repo structure
Thanks! This should catch simple mistakes. |
This PR adds a very simple GitHub Actions script to validate JSON Schemas file using jsonschema in Python.
Example output: https://github.com/AntoineAugusti/gbfs-json-schema/runs/4081742347?check_suite_focus=true
The goal is to catch potential errors when doing PRs.