guardian / typerighter

Even if you’re the right typer, couldn’t hurt to use Typerighter!
Apache License 2.0
276 stars 12 forks source link

Support CI via Github Actions #283

Closed aracho1 closed 1 year ago

aracho1 commented 1 year ago

What does this change?

This PR build and deploys to RiffRaff via Github Actions.

Following the merge of this PR, we will want to:

  1. include scalaFmt checks. We should add it as part of the Github action.
  2. disable Teamcity's builds to stop duplicates occurring.

How to test

We're not sure how to test this change until this PR has been merged. However, this branch has been deployed via an action, you can see it in RiffRaff by looking at the builds for Editorial Tools::Typerighter (it's build 1297).

twrichards commented 1 year ago

LGTM - we might want to also allow CI to run on pushes to non-main branches (though I know in the past this has been mentioned as cost ineffective)

Free for public repos (unless using special instance/runner types), better to have builds available for your branches without needing a pull request (worth noting too that pull request triggered actions also use the special merge branch which isn't strictly the branch in question but instead a simulation of the branch merged with the base branch [usually main] which is not very transparent, so I vote for for build branches and not pull requests.

jonathonherbert commented 1 year ago

Looks great! Just to mention that #171 includes a scalafmt check in a pre-commit hook.

twrichards commented 1 year ago

@rhystmills you were asking about how to run on all branches, here's an example... https://github.com/guardian/pinboard/blob/main/.github/workflows/ci.yml#L4-L8

rhystmills commented 1 year ago

@rhystmills you were asking about how to run on all branches, here's an example... https://github.com/guardian/pinboard/blob/main/.github/workflows/ci.yml#L4-L8

Thanks Tom. I agree on-push works better than on-PR - that's updated too.