From af07d2aecb92fce25a1ee7b618106d304cc9b305 Mon Sep 17 00:00:00 2001 From: Aerex Date: Thu, 16 Jun 2022 11:35:50 -0500 Subject: [PATCH 1/5] build(github_action): Set GOPATH env before any Go step --- .github/workflows/go.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index ac3d982..22d46df 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -12,7 +12,10 @@ jobs: name: Build runs-on: ubuntu-latest steps: - + - name: Setup env + run: | + echo "::set-env name=GOPATH::$(go env GOPATH)" + echo "::add-path::$(go env GOPATH)/bin" - name: Set up Go 1.x uses: actions/setup-go@v2 with: From 102109f8ff6f1e94f99ba2278e2f02646449a0cc Mon Sep 17 00:00:00 2001 From: Aerex Date: Thu, 16 Jun 2022 11:57:29 -0500 Subject: [PATCH 2/5] build: Used environment var files to set GOPATH --- .github/workflows/go.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 22d46df..c5d2fb4 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -14,8 +14,8 @@ jobs: steps: - name: Setup env run: | - echo "::set-env name=GOPATH::$(go env GOPATH)" - echo "::add-path::$(go env GOPATH)/bin" + echo "GOPATH=$(go env GOPATH)" >> $GOPATH + echo "$(go env GOPATH)/bin" >> $PATH - name: Set up Go 1.x uses: actions/setup-go@v2 with: From 5cd87f973263a89123338905710af2fc41ca825d Mon Sep 17 00:00:00 2001 From: Aerex Date: Thu, 16 Jun 2022 12:05:51 -0500 Subject: [PATCH 3/5] build: Used v3 of github setup go actions --- .github/workflows/go.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c5d2fb4..78a9586 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -11,18 +11,13 @@ jobs: build: name: Build runs-on: ubuntu-latest - steps: - - name: Setup env - run: | - echo "GOPATH=$(go env GOPATH)" >> $GOPATH - echo "$(go env GOPATH)/bin" >> $PATH - name: Set up Go 1.x - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: - go-version: ^1.13 + go-version: '>=1.17' - name: Check out code into the Go module directory - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Get dependencies run: | From 0d93cf94cd363a31bd8257f63c2ded0c13bf5fb3 Mon Sep 17 00:00:00 2001 From: Aerex Date: Thu, 16 Jun 2022 13:19:30 -0500 Subject: [PATCH 4/5] build: Added missing steps section --- .github/workflows/go.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 78a9586..7c1396c 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -11,6 +11,8 @@ jobs: build: name: Build runs-on: ubuntu-latest + steps: + - name: Set up Go 1.x uses: actions/setup-go@v3 with: From b49066d9a04e28c21595e3a6eddfa1a650d26e92 Mon Sep 17 00:00:00 2001 From: Aerex Date: Thu, 16 Jun 2022 13:29:20 -0500 Subject: [PATCH 5/5] build: Exported GOPATH before running test --- .github/workflows/go.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7c1396c..3d173df 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -36,4 +36,6 @@ jobs: run: ./bin/build - name: Test - run: ./bin/test + run: | + export GOPATH=$(go env GOPATH)/bin + ./bin/test