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
Add 1.16.x and 1.17.x to the build matrix #29
Conversation
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 for the new PR! It looks good, except it's missing a couple entries, see inline comment for more.
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.
It looks like all Go 1.16 configurations are failing with:
go test ./...
shell: /usr/bin/bash -e {0}
env:
GOROOT: /opt/hostedtoolcache/go/1.16.6/x64
GOPATH: /home/runner/work/stack/stack
GOFLAGS:
go: go.mod file not found in current directory or any parent directory; see 'go help modules'
I suspect this is due to Go 1.16 defaulting GO111MODULE=on
and the Github action script I have is running go test ./...
in the wrong directory. It's running in some parent dir and not seeing the go.mod
file. I think this works with earlier versions of Go because they would run in GOPATH mode and find the package in a subdirectory.
I think we need to specify the working-directory
option for the last step of the test script as documented here: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsrun.
So the last step should look like:
- name: Test
env:
GOPATH: "${{github.workspace}}"
GOFLAGS: ${{ matrix.go-flags }}
working-directory: "${{github.workspace}}/src/github.com/${{github.repository}}"
run: go test ./...
This problem existed before this PR and is only revealed now due to changes in Go 1.16 behavior compared to previous releases.
@kishaningithub Do you plan to add the working directory configuration? If not, I can take over this PR if you want. |
@ChrisHines Thanks a lot for your patience. Have added the working-directory explicitly as you requested and also have added the brand new go 1.17 version to the build matrix :-) |
Awesome! Hopefully that's all we need. Kicking off the builds. We'll see how it goes. |
OK, only the |
No description provided.