CI: fix Go version matrix, and drop go 1.12, add go 1.15#19
CI: fix Go version matrix, and drop go 1.12, add go 1.15#19AkihiroSuda merged 2 commits intomoby:masterfrom
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 <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
648ff7a to
2e1feed
Compare
|
@AkihiroSuda PTAL we may have to check other repositories as well, in case the same bug is present there 😓 |
| uses: actions/setup-go@v2 | ||
| with: | ||
| go-version: ${{ matrix.go-version }} | ||
| go-version: ${{ matrix.go }} |
There was a problem hiding this comment.
i think it isgo-versions in line 7 and go-version here, so it didn't work.
There was a problem hiding this comment.
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-versionsbeing plural (because it's a list), andwith -> go-versionsingular, 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
.xsuffixes? (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-versionsversusgo)?
And that's when I found the difference (plural versus singular).
There was a problem hiding this comment.
@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.