-
Notifications
You must be signed in to change notification settings - Fork 547
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 information how to properly set up checked-out code with GO... env variables #102
Comments
I got it to work with this yml: env:
GOPATH: ${{ github.workspace }}
GOBIN: ${{ github.workspace }}/bin
defaults:
run:
working-directory: ${{ env.GOPATH }}/src/myproject
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
path: ${{ env.GOPATH }}/src/myproject
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ... The key was to set this: "working-directory: ${{ env.GOPATH }}/src/myproject" and be consistent. |
what is github.workspace .. its failing for me when it is supposed to be that /home/runner/go |
hi @januszm thanks for the comments earlier. Your workaround is good. I tried and the test passed. However there is more to this and since I am not a developer I can't talk too much. basically the idea of modules as documented at golan.org for go version 1.15 is that GO111MODULE is not needed to be set and also using modules means no use of GOPATH. But neither works in case of my code for a specific integration test framework. Normal build works. Thanks you again |
my problem turned out to be unique for the codebase in question kubernetes/kube-openapi#225 |
Hi @januszm ! Sorry for the late response! |
Hi, @januszm ! Thanks for your proposal. Feel free to contact us if you have any questions. |
Most basic setup with the following steps:
will fail during
dep ensure
orgo test ./...
:I must admit that with a little bit of searching I couldn't easily configure it.
Currently it starts with empty directories:
The code after checkout is in:
It would be worth adding some instructions on how to modify the "checkout" step or how to set environment variables or what shell commands to execute to make it all work.
The text was updated successfully, but these errors were encountered: