joy-framework / joy

A full stack web framework written in janet
https://joy.swlkr.com
MIT License
537 stars 30 forks source link

Automation and Code Quality Gates #57

Open hweeks opened 4 years ago

hweeks commented 4 years ago

What I'm Proposing

I'd like to see this project build and publish docker containers, as well as run tests and code quality checks on each commit. I'm open to the idea I just really enjoy tooling and making stuff automated, and it's not needed in this project.

I was thinking we could use CircleCI or Travis, both have permanent free tiers for open source projects. Ideally the job flow would look like this:

Each PR Job

  1. Run the test suite
  2. Enforce coverage
  3. Check if docker container can build

Each Master Job

  1. All steps from PR
  2. Build and publish a new docker container to docker hub
  3. Create a tag and release for Joy, push back to repo
  4. Run an integration test suite (this is a new feature we'd have to discuss)

Who will do it?

I'm very happy to do this work, explain and document the release process, and steps in the CI config. I'm also going need you to create some accounts that the joy-org "owns", namely:

  1. CircleCI/Travis Account
  2. Docker Hub Account
  3. Github Token

These can be safely obfuscated by you, and I can show you how to embed these values in either platform. If this seems like something you'd like, let me know and I'll get it knocked out for you!

Final Thoughts

If you like this we can talk about automated release management, and more. I think it's a good idea to try out the simple case first, see if there is any value for the project, and extend it at a future date.

If merged the MR would be two files:

  1. Config for CircleCI/Travis
  2. CONTRIBUTING.md with info and guides
swlkr commented 4 years ago

Yeah that sounds great! The more places people can find the project the better, I say.

I was going to slap a heroku button on the README but this is much more thorough haha

swlkr commented 4 years ago

I’m going to add you as a member

there’s only one rule: don’t delete the repo haha

hweeks commented 4 years ago

that feels like a reasonable ask, i'll take a stab at this

swlkr commented 4 years ago

I'm looking at this issue again, thanks so much for doing all of this heavy lifting, I really appreciate it. It's made this project so much better with the automatic testing and everything!

hweeks commented 4 years ago

I've been trying to figure out how you get published on jpm? Is there some docs or something else on that? I'd like to automate releasing this to that next but I'm lost here.

@swlkr

swlkr commented 4 years ago

jpm is a repo last time I checked

https://github.com/janet-lang/pkgs/blob/master/pkgs.janet

but I don’t think it requires updating, it just pulls the latest master when you run

jpm install joy