Skip to content

Commit

Permalink
have fun with the GOPATH
Browse files Browse the repository at this point in the history
  • Loading branch information
gesellix committed Feb 12, 2020
1 parent 315ef91 commit 58ab695
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,34 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.12.x
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
path: go/src/github.com/gesellix/couchdb-prometheus-exporter
# see https://github.com/actions/setup-go/issues/14
- name: Set GOPATH
run: |
echo "##[set-env name=GOPATH;]$(dirname $GITHUB_WORKSPACE)"
echo "##[add-path]$(dirname $GITHUB_WORKSPACE)/bin"
echo "##[add-path]$(dirname $GITHUB_WORKSPACE)/bin/windows_386"
shell: bash
- name: Get dependencies
run: |
mkdir -p $GOPATH/bin
export PATH=$PATH:$GOPATH/bin
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
env:
GOPATH: /home/runner/work/couchdb-prometheus-exporter/go
- name: Check
run: |
cd $GOPATH/src/github.com/gesellix/couchdb-prometheus-exporter
./integrationtest-setup.sh
go test -v ./...
./integrationtest-teardown.sh
env:
GOPATH: /home/runner/work/couchdb-prometheus-exporter/go
- name: Build
run: go build -v ./...
env:
GOPATH: /home/runner/work/couchdb-prometheus-exporter/go
...

0 comments on commit 58ab695

Please sign in to comment.