-
Notifications
You must be signed in to change notification settings - Fork 103
chore: test with go 1.20 and cleanup tooling #444
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
Conversation
✅ Deploy Preview for open-api ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
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.
nice! nothing blocking
.github/workflows/test.yml
Outdated
@@ -33,10 +33,10 @@ jobs: | |||
strategy: | |||
matrix: | |||
os: [ubuntu-latest, macOS-latest, windows-latest] | |||
go_version: [1.17.x, 1.18.x, 1.19.x] | |||
go_version: [1.17.x, 1.18.x, 1.19.x, 1.20.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.
i think you can remove 1.17
and maybe also 1.18
as i think it would be fine to support 2 recent versions only
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.
Okay changed.
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Install Go ${{ matrix.go }} | ||
- name: Install Go ${{ matrix.go_version }} |
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.
nice catch!
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.
Thanks to https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-github-actions which also checks for errors.
@@ -10,13 +10,9 @@ require ( | |||
github.com/go-openapi/strfmt v0.19.11 | |||
github.com/go-openapi/swag v0.19.12 | |||
github.com/go-openapi/validate v0.20.0 | |||
github.com/go-swagger/go-swagger v0.23.0 |
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.
i think you need to keep this dependency so that the go run
for the go:generate
instructions work.
the usual advice on how to do this is by creating a package called tools
that has this:
package tools
import (
_ "github.com/go-swagger/go-swagger"
)
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.
if go run pkg@version
is used then the go module is compiled and run without it being installed or affecting the current module. That is what I did. If you prefer I can change that back to what you are suggesting.
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.
if
go run pkg@version
is used then the go module is compiled and run without it being installed or affecting the current module. That is what I did. If you prefer I can change that back to what you are suggesting.
ah good point. i'd prefer having it in go.mod
so renovate can update it though
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.
Done
Added go 1.20 to the test matrix.
This gets rid of
gobin
, as it is not needed anymore, insteadgo run
can be used. Alsorichgo
is removed (for fancy test output) because I haven't seen this in any of our other repos, and even the author recommends not using it :)I had to update
swagger-go
from 0.23 to 0.24, because 0.23 wouldn't work withgo run
. 0.24 introduces case-insensitive enums, hence the changes to the generated models. I tried updating to the latest version (0.30), but then all generated models are very different, if we want to update we should maybe do it in steps.Also remove the deprecated labeler job.
Fixes #416