Skip to content

Commit

Permalink
Explicitly set GOPATH
Browse files Browse the repository at this point in the history
Although Github Actions provides a Go action, that action doesn't set up the environment for use with Go.

actions/setup-go#14 suggests that this is broken-as-intended.

The two workarounds suggested there are using the Go container image to run tests; or to explicitly set up the environment like this.
  • Loading branch information
jamezpolley committed Dec 18, 2019
1 parent 8aa388a commit d0aa841
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jobs:
go-version: 1.13
id: go

- name: setup env
run: |
echo "::set-env name=GOPATH::$(go env GOPATH)"
echo "::add-path::$(go env GOPATH)/bin"
shell: bash

- name: Check out code into the Go module directory
uses: actions/checkout@v1

Expand Down

0 comments on commit d0aa841

Please sign in to comment.