-
Notifications
You must be signed in to change notification settings - Fork 430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Github Action should use the same lint command as local #71
Conversation
da27ce5
to
a913f31
Compare
Docker is already installed on ubuntu https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md#tools
a913f31
to
44521ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I recall why this is done this way - Is it allowed to run docker run
from within a GH action?
-E unused | ||
-E varcheck | ||
- name: Lint code | ||
run: make lint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wants a trailing newline
steps: | ||
- name: Install Go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super minor, but your editor indents list items and mine doesn't. Can you make it the same whitespace as test.yaml, please?
There's not much point in doing the matrix of versions once we are using a docker image, it will always use the same Go version, right? |
02a976e
to
72d5128
Compare
I changed the test and crossbuild actions to use make - look at those? |
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go-versions: [ 1.16.x, 1.17.x, 1.18.x, 1.19.x ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For lint, you can get rid of this axis in the matrix, and remove the "install" step
strategy: | ||
matrix: | ||
go-versions: [ 1.16.x, 1.17.x, 1.18.x, 1.19.x ] | ||
platform: [ ubuntu-latest, windows-latest ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's remove Windows - it doesn't practically work
To convince myself, I ended up just making the change myself, sorry. |
Yes, docker is installed in the ubuntu latest ones and we can use it in GH https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md#tools This also needs to be fixed #73 |
Fixes #69
The nice thing of having a
make lint
is it runs tasks in docker container that works in any environment. We do not need to maintain multiple lint settings in multiple files and we can reuse the samemake lint
.