diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfc82462..078b524a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 - - name: Get dependencies + # see https://github.com/actions/setup-go/issues/14 + - name: Set GOPATH 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 + 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 +# go get -v -t -d ./... +# if [ -f Gopkg.toml ]; then +# curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh +# dep ensure +# fi - 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 ...