From f01468e987b6434e9c29fd5316134ebde8a20b86 Mon Sep 17 00:00:00 2001 From: Laszlo Fogas Date: Tue, 27 Aug 2019 09:26:01 +0200 Subject: [PATCH] Github Actions --- .github/workflows/go.yml | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 000000000..b78930b41 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,45 @@ +name: Go +on: [push] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.12 + uses: actions/setup-go@v1 + with: + go-version: 1.12.4 + + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + with: + fetch-depth: 1 + path: go/src/github.com/laszlocph/woodpecker + + - name: Debug + run: | + pwd + echo ${HOME} + echo ${GITHUB_WORKSPACE} + echo ${GOPATH} + echo ${GOROOT} + env: + GOPATH: /home/runner/work/woodpecker/go + + - name: Test + run: | + go get -u golang.org/x/tools/cmd/cover + go get -u golang.org/x/net/context + go get -u golang.org/x/net/context/ctxhttp + go get -u github.com/golang/protobuf/proto + go get -u github.com/golang/protobuf/protoc-gen-go + go test -cover $(go list ./... | grep -v /vendor/) + env: + GOPATH: /home/runner/work/woodpecker/go + + - name: Build + run: ./.drone.sh + env: + GOPATH: /home/runner/work/woodpecker/go