saurabhnanda / odd-jobs

Haskell job queue with admin UI and loads of other features.
https://www.haskelltutorials.com/odd-jobs/
BSD 3-Clause "New" or "Revised" License
75 stars 29 forks source link

Setup CI using Github Actions #50

Closed mjarosie closed 4 years ago

mjarosie commented 4 years ago

Fixes #46

For now it's a very simple setup:

I've also added a short developer setup description.

mjarosie commented 4 years ago

Sorry for that PR I opened it by mistake. I'm just trying to play around with GitHub actions to see if I can contribute to one of the issues, I'll be doing it in my fork for now until I know it works.

saurabhnanda commented 4 years ago

@mjarosie Brilliant! Thank you. Let me know if you need any help. Head over to #46 if you'd like to discuss something about this issue/PR.

mjarosie commented 4 years ago

Following up the discussion about dev setup in #46: I'm not sure how detailed should the description be, I've made it quite brief for now - that can be extended when needed.

The CI is quite simple now - it just runs stack build for a specific stack version, should we stick to v2.3.3 or should we always build using the latest of stack?

saurabhnanda commented 4 years ago

Thank you @mjarosie . Can we set this up to run on all branches and commits?

saurabhnanda commented 4 years ago

@mjarosie it seems to be working after the merge. Check out https://github.com/saurabhnanda/odd-jobs/pull/43 - I had to close and reopen the PR for the CI to trigger.

I believe it should work automatically for all new PRs.

Thanks @mjarosie 👍

saurabhnanda commented 4 years ago

@mjarosie which of the steps showing up in https://github.com/saurabhnanda/odd-jobs/pull/43/checks?check_run_id=1197659802 will run every time this workflow/action runs? I hope stack + GHC installation will be skipped in the future.

mjarosie commented 4 years ago

@saurabhnanda awesome! I'm happy I could contribute! : ) Based on the logs of setup-haskell action in the CI run that you've linked it looks like it's caching Stack installation, hopefully if builds happen regularly the setup will be quicker:

image

I've also used cache action for caching ~/.stack directory so pulling dependencies next time should be quicker as well.