pawitp / protobuf-decoder

JavaScript-based web UI to decode ad-hoc Protobuf data
https://protobuf-decoder.netlify.app/
MIT License
392 stars 91 forks source link

GH Actions #89

Closed konsumer closed 5 months ago

konsumer commented 5 months ago

Related to #88

This adds 2 actions for publishing to Github Pages (I think that needs some config in Settings) and Testing directly in Github Actions.

This improves speed and issue-visibility.

You can see example job-runs:

And since I have konsumer.js.org hooked up to my github pages, it creates this

It also drops CircleCI, since that is not really needed (Github Actions would take over that job.)

konsumer commented 5 months ago

I think static could depend on test, which would merge the 2 npm ci calls, and not allow a site-publish with failing tests, but it runs pretty fast (even with duplicate installs) so I kept them seperate to make it more clear what each job is doing.

Currently, I didn't have any coverage-gating, but that could be added as part of test job. Coverage, as it is, might be a bit tricky, because we'd need to grab previous coverage, and compare it on test, but I find these kinds of automated tests a bit annoying (often the coverage is not less than it was, just same amount of non-100%, as was the case with my other PR) especially on frontend projects (with limited react-level testing) so I think it's fine without it, personally, but I am willing to look into it, if you are interested in that. I think this can do similar coverage-comparison, but I could also add back circleci (without netlify) and achieve something similar, I think.

konsumer commented 5 months ago

I think I may have added back all the coverage stuff without circleci, in last commit. It seems to hang on curl https://codecov.io/bash but that might be because I haven't set it up for my fork.

It shows nicely in the action-run, though:

Screenshot 2024-04-30 at 8 22 13 PM
konsumer commented 5 months ago

I added a github secret for CODECOV_TOKEN and now it shows up:

Screenshot 2024-04-30 at 8 28 40 PM

So, I think that is all that is needed.

konsumer commented 5 months ago

I'd also like to get rid of these warnings, but it might just be a problem with semantic-ui-react. Have you ever used daisyui? It's a similar UI toolkit, but uses tailwind and produces smaller output (much less CSS and no JS) and has some really nice theming options. I use this a lot for my own projects.

Screenshot 2024-04-30 at 8 35 51 PM
pawitp commented 5 months ago

Hi. While I appreciate the contribution, I'm not looking to migrate any CI/hosting pipeline at the moment. Particularly, what exists right now works fine and the netlify domain performs decently well on SEO.

Netlify also provides a subdomain for every PR.