Skip to content
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

JSON validation GitHub action #4

Open
1 of 2 tasks
timpulver opened this issue Aug 13, 2020 · 2 comments
Open
1 of 2 tasks

JSON validation GitHub action #4

timpulver opened this issue Aug 13, 2020 · 2 comments

Comments

@timpulver
Copy link
Owner

timpulver commented Aug 13, 2020

We should set up a GitHub Action to validate the JSON file on every pull request.

  • validate that JSON file is valid JSON file
  • validate that schema of JSON file is valid
@michaelGregoire
Copy link
Collaborator

I implemented a validation script. However, in order to validate the json, the file needs to be required. If there are syntax errors in the file, an error is thrown. So, the script is not directly validating the json syntax, but it does do the trick. I'll let you close this ticket or not, if you feel that my implementation needs a bit of work.

@timpulver
Copy link
Owner Author

Great @michaelGregoire
Looks good.

Did you use GitHub Actions before?

A good workflow would be:

On every new pull request to master:
  run validation script
  if it does not throw an error
    approve pull request
  if error is thrown:
    reject pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants