I decided to work on improving my workflow in Go. Some of the things I had in mind going into this project were:
I created a repo go-ci with a simple test server. Next I started browsing the GitHub Marketplace for existing actions/apps I could use.
This required a few actions. I used one separate action for building and testing. Another action I thought was cool allowed me to run a benchmark test and upload the results to GitHub pages.
I used an existing action for linting which under the hood used
This was nice because it supported multiple linters and would catch more issues.
For formatting, I saw a few actions which would fail a build for unformatted code.
However, I really wanted to auto format the Go code on each PR since this was a repetitive task.
I looked around and saw a few existing actions for JS projects and decided to create a similar one.
I created my own action using
gofumpt underneath and published it to the Marketplace.
I wanted each PR to have a deployable app. The quickest way for me was to setup a Heroku pipeline and enable Review apps. While this works, there is probably a better way of doing this.
And that's it.
Just do it - Shia Surprise