-
Notifications
You must be signed in to change notification settings - Fork 0
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
Basic CI for Go CF Driver #71
Conversation
This isolates dependency problems, could help caching
It was _not_ using the default working-directory
This reverts commit 9cc8c15.
.github/workflows/cf-driver-go.yml
Outdated
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 |
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.
[question] can we start out with v5
of the action?
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.
Probably? I didn't realized I'd picked an old one, can you tell me how this came up for you?
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 checked the action readme to see if we could avoid passing go-version
(seems like no? but if we can just have it inherit from go.mod
that'd be ideal) and saw that v5 was out
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.
Ah, I was hoping some automated thing had surfaced it :-/
But yeah, that's what I had initially planned to do, but then something I read in documentation made me think specifying a version would result in GitHub being more likely to pull a cached version of Go--and that seemed like a nice enough upside to me. I meant to verify it actually made a difference, though, and I forgot to do that.
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.
So, it does make a difference, but not a particularly large difference. Specifying a 1.23.x
version for the action takes < 1s, using the go.mod
takes ~8s—after the initial run which was an extra ~22s, but I'm thinking this probably wouldn't happen often.
I think for 8s it probably isn't worth it, and it might be faster if I don't specify a patch version in go.mod
, which we have no reason to do.
Edit: indeed dropping the patch version takes it back to pulling whatever GitHub already had on hand and was a nice ~2s.
@@ -18,7 +18,7 @@ jobs: | |||
- name: Set up Go | |||
uses: actions/setup-go@v5 | |||
with: | |||
go-version: "1.23.x" | |||
go-version-file: runner/cf-driver-go/go.mod |
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.
[praise] nice!
🎫 Addresses issue: https://github.com/GSA-TTS/devtools-program/issues/171
Go Runner CI testing, linting, etc.
🛠 Summary of changes
Adds a very basic workflow to run
fmt
,vet
,build
&test
on the Go cf-driver.