SchemaStore / schemastore

A collection of JSON schema files including full API
http://schemastore.org
Apache License 2.0
3.02k stars 1.65k forks source link

QA using GitHub action? #1274

Closed remyrylan closed 3 months ago

remyrylan commented 3 years ago

I wanted to ask first before sending a PR.

@madskristensen what do you think about having a GitHub action that runs on every PR to check the quality of the schema(AJV works great for this)? Maybe additionally to use cSpell for spell checking?

This way lots of issues could be resolved before ever being merged in.

Edit: Another question -- would you be open to PRs for GitHub "community health" related files such as issue templates? I see a lot of issues in here that are tiny minor things that people SHOULD be submitting PRs for. Having multiple issue templates would enable the "choose your issue type" prompt (example: https://github.com/reduxjs/redux/issues/new/choose).

The issue type prompt could cut down on tons of issues by spelling it out clearly for people that this is a community-driven collection of schemas. That they should not be submitting issues for missing fields, typos, etc... those need to be PRs.

madskristensen commented 3 years ago

That's a great idea. Today we're using AppVeyor but I prefer GitHub Actions, but don't have any experience with it. Love the spell checking idea too

Yes, community health PRs would be awesome

remyrylan commented 3 years ago

That's great to hear you like the idea. I'm working on a bunch of code quality checking systems using GitHub actions for packages I author. I'm close to wrapping everything up, and I'll be able to share a lot of that code here. I'll send a PR probably next week.

The PRs will likely need to be in stages to avoid causing friction with new contributors by having them receive notices for pre-existing issues. Once the code quality checks are in place, I'll need to also submit any necessary fixes for every existing schema.

madskristensen commented 3 years ago

that would be awesome. thank you!

GerryFerdinandus commented 3 years ago

@jrylan This week I am experimenting with 'schemasafe' JSON validator #1269 Did some simple testing #1275

Schema store is going for AJV validator?

remyrylan commented 3 years ago

@GerryFerdinandus apologies, I had not seen that PR. I'll take a look when I get to implementing the GitHub action. I'm impartial to the implementation, if SchemaSafe provides integrity checking as decent as AJV, then I'll stick with that. Right now, I have no experience with SchemaSafe, and plenty with AJV, but I will research it. Thank you!

GerryFerdinandus commented 3 years ago

There is an issue with duplicate property key #1265 Standard say SHOULD = "RECOMMENDED" and not MUST The standard json parser will accept duplicate key. So an extra NPM test module is needed. I was planning to implement this (find-duplicated-property-keys ) as an extra grunt task. But because you are more capable javascript programmer I leave that to you :smile:

remyrylan commented 3 years ago

Thanks, @GerryFerdinandus. I'll take a look. I'll get everything setup.

@madskristensen make sure if you get an email invite from @ffflorian to the @schemastore npm org that you accept it. I think npm invalidates org invites after 3 days.

It's a pretty minimal effort with GitHub actions to set it up to automatically publish each update to npm, I'll handle all of that.

madskristensen commented 3 years ago

Ok, I'll keep my eye out for it

remyrylan commented 3 years ago

Quick update: I have some unexpected downtime, my MacBook needs a keyboard and battery replacement. I'll be back at it soon. I can promise I'll get this done though, I need it for several packages I'm working on publishing.

ffflorian commented 3 years ago

@jrylan what is the progress on publishing npm packages? :slightly_smiling_face:

G-Rath commented 2 years ago

@jrylan is this still something that is happening? As a big fan of both these schemas and typescript, I'm happy to try and help where I can.

Currently feels like we're in a bit of a limbo since @ffflorian has deprecated/archived the @schemastore/ types that use to fill this role in favor of this issue 😅

ffflorian commented 2 years ago

Yes, I am also wondering if this is going to happen. If not, I'm happy to unarchive my repository and continue publishing types.

Kurt-von-Laven commented 2 years ago

One approach here might be to see about adding AJV to MegaLinter and then using its GitHub Action since it comes with cspell and many other linters. Alternatively, since cspell also offers a pre-commit hook, and pre-commit has a GitHub Action, you might ask AJV to offer a pre-commit hook (often doable with ~10 lines of YAML). Finally, cspell offers a standalone GitHub Action.

jameswilddev commented 2 years ago

What's the current way to get up-to-date type definitions from this repository into a Node/NPM project?

G-Rath commented 2 years ago

@ffflorian given we've not seen any progress on this, would you mind doing that unarchiving & continuing to publish types?

ffflorian commented 2 years ago

@G-Rath yes, I'll do that ASAP :)

jameswilddev commented 2 years ago

Awesome, thanks so much!

hyperupcall commented 3 months ago

Closing as fixed, since various GitHub actions have been implemented in the meantime.