kkinnear / zprint

Executables, uberjar, and library to beautifully format Clojure and Clojurescript source code and s-expressions.
MIT License
554 stars 47 forks source link

Add CI workflow for main branch #266

Closed zharinov closed 2 years ago

zharinov commented 2 years ago

Thank you for kind words regarding my work on Pull Request CI workflow. Here we go a little bit further and enable workflow running on the main branch after every PR merge.

imagen

As you may notice, many repositories have this orange dot near to the commit SHA. It's clickable and it points to CI run for the main branch, not the PR.

main-branch.yml duplicates everything pull-request.yml does, but additionally performs test-cljs run which lasts ~10 minutes. Because it was slower than other tests from the PR workflow, I include it here on the main branch. This way, when ClojureScript builds are failing (which I hope is rare occasion), you at least will know this before shipping new release.

Unfortunately, there is no straightforward ways for YAML code reuse in GitHub Actions, so it's mostly a copy-paste of previous yaml file.

See also example run on the main branch of my zprint fork: https://github.com/zharinov/zprint/actions/runs/3069699879

Once this PR is merged, the next step will be to add additional native-image build steps for missing platforms, so that for every commit in main branch you will have zprintl, zprintm and zprint-filter binaries available for testing.

kkinnear commented 2 years ago

Thank you for this, it looks good. Thanks for the example on your fork. I've been away from my desk for a while, so I'm sorry to have let this hang for a bit. Thanks again for putting all of this together. I'm curious about why planck doesn't work on linux. That's pretty strange. I see what I can figure out, but as I only run linux on docker, I'm not sure how much I'll figure out. If the cljs tests run on macOS, I suppose that is probably enough.