Uh oh!
There was an error while loading. Please reload this page.
GitHub Actions for lint - #3211
Conversation
f1f3394 to
2580deaComparecrazy-max
commented
Jul 26, 2021
We could also cleanup |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Codecov Report
@@ Coverage Diff @@## master #3211 +/- ##
=======================================
Coverage 58.58% 58.58% =======================================
Files 299 299 Lines 21502 21502 =======================================
Hits 12597 12597 Misses 7983 7983 Partials 922 922 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
thaJeztah
commented
Jul 29, 2021
Whoops; this needs a rebase, because the go1.16 update was merged |
crazy-max
commented
Jul 29, 2021
Ah yes indeed, will do that |
911c49e to
ca626e1Comparecrazy-max
commented
Jul 29, 2021
@thaJeztah After rebase looks like there are some warnings with golangci-lint which are not visible on CircleCI: Looks linked to golangci/golangci-lint#885. |
e2fcecf to
62d6940CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| fail-fast: false | ||
| matrix: | ||
| target: | ||
| - lint |
There was a problem hiding this comment.
The official golangci-lint GitHub Action can also run on Windows, Darwin. Wondering if we can trick it by setting GOOS/GOARCH to also lint non-matching platforms (especially for the CLI, which will be extensively used on macOS and Windows)
There was a problem hiding this comment.
Yes I think we can have a special matrix to run Windows and MacOS runners in this case. We can do that in follow-up.
There was a problem hiding this comment.
Yeah, it's tricky, because of course we can't run a macOS container, and Windows doesn't support BuildKit for Windows containers (if it would, it's still possible that building takes a long time (Moby Ci can take 10 minutes to build the Dockerfile, a large portion of that is taken by just pulling the base image 😞).
So if it's possible to somehow trick golangci-lint (through GOOS / GOARCH) that would be a lot easier.
If not, then perhaps (for CI) we would have to consider using the official golangci-lint GitHub action, which doesn't (I think?) run containerised, but at least runs fast (and on Windows and macOS). We can still use the BuildKit approach for local use (and for Linux perhaps).
There was a problem hiding this comment.
using the official golangci-lint GitHub action
Yes I think we can do that with https://github.com/golangci/golangci-lint-action for Win/MacOS.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
thaJeztah
commented
Aug 5, 2021
@silvin-lubecki PTAL |
silvin-lubecki
left a comment
There was a problem hiding this comment.
Looks good, thanks @crazy-max !
First step to switch from CircleCI to GitHub Actions for lint.
shellcheckandlintDockerfiles have also been simplified and don't need to be built and run.Have also added new bake targets for that:
docker buildx bake lintormake -f docker.Makefile lintdocker buildx bake shellcheckormake -f docker.Makefile shellcheckcc @thaJeztah
Signed-off-by: CrazyMax crazy-max@users.noreply.github.com