discentem / cavorite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Github Actions for golint and compiling

discentem opened this issue · comments

commented
commented

Consider doing this with a dockerfile so we can use the same Dockerfile to run linting locally: https://thedevelopercafe.com/articles/custom-github-action-with-go-29d9ce66e5a8

Do we have a strong preference for golint over staticcheck or golangci-lint?

The latter is supported by a GitHub-maintained marketplace action, Super-Linter which has a safety and support advantage.

commented

No strong preference whatsoever. We can always iterate and change later if desired, but Github-maintained sounds nice 🎉 Anything is better than nothing at this point.

commented

Though, perhaps a downside of https://github.com/marketplace/actions/super-linter is that we'll have to provide some separate instructions for running linting locally. However, local linting isn't necessarily in scope for this issue; it would simply be a cool bonus.

My current work here is to add:

  1. Lint any pull request or push.
  2. Test, build, and add a release for any merge to main tagged v*, e.g. v0.0.1.

Is this what you had in mind @discentem?

commented

Yep! Though I think it we should build and run tests on pull requests too? Those builds will get "thrown away" but this would help reviewers I think: don't bother reviewing unless it builds.

commented

Will be resolved by #39