-
Notifications
You must be signed in to change notification settings - Fork 26
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
CI: fix Go version matrix, and drop go 1.12, add go 1.15 #19
Conversation
I think something is wrong in how CI is setup; see #21 - looks like may not be testing different Go versions? |
32bcfef
to
648ff7a
Compare
the matrix used "go-versions", but it was later referenced as "matrix.go-version", which may have been the cause we did not install multiple versions. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
648ff7a
to
2e1feed
Compare
@AkihiroSuda PTAL we may have to check other repositories as well, in case the same bug is present there 😓 |
with: | ||
go-version: ${{ matrix.go-version }} | ||
go-version: ${{ matrix.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.
Why change this line?
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 it isgo-versions
in line 7 and go-version
here, so it didn't work.
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, yes, so here's why I renamed (and why it was somewhat easy to overlook the problem);
Originally, the matrix looked like (simplified);
strategy:
matrix:
go-versions: [1.12.x, 1.13.x, 1.14.x]
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
I haven't done a lot with GH Actions yet, so when reading the above, I made the incorrect assumption that was how GH actions handled matrix values;
matrix -> go-versions
being plural (because it's a list), andwith -> go-version
singular, because it gets assigned a value from the matrix.
Clearly, I was wrong there (and the with:
value must have the same name as the value in the matrix:
).
When looking for the problem, I went to the GitHub repo of the action; https://github.com/actions/setup-go/blob/v2.1.3/README.md#usage. Comparing those examples with what we had;
- Perhaps it was because we didn't explicitly add quotes around the values in the
1.12.x
(recalling the dreaded YAML time issue docker/compose#103 issue when specifying port-mappings in compose) - Perhaps it didn't support the
.x
suffixes? (planning on opening a ticket or PR in that repository to add a section explaining what formats are accepted) - Perhaps it was a bug in v1, fixed in v2?
- Perhaps it was the name (
go-versions
versusgo
)?
And that's when I found the difference (plural versus singular).
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.
@AkihiroSuda I can rename to go-version
if you prefer; I used go
(as in the example) because I thought it was less likely for someone to rename go
to gos
(plural), and re-introduce the bug, but I'm not really attached to the name
Opened actions/setup-go#82 and actions/setup-go#83 enhancement requests for the GitHub action |
No description provided.