build: Setup github actions for CI.

This commit is contained in:
Dave Collins 2019-09-20 10:10:58 -05:00
parent 450a680097
commit 4fcf24f02c
No known key found for this signature in database
GPG Key ID: B8904D9D9C93D1F2
2 changed files with 29 additions and 1 deletions

28
.github/workflows/go.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Build and Test
on: [push, pull_request]
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
strategy:
matrix:
go: [1.12, 1.13]
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
- name: Check out source
uses: actions/checkout@v1
- name: Install Linters
run: "curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.18.0"
- name: Build
env:
GO111MODULE: "on"
run: go build ./...
- name: Test
env:
GO111MODULE: "on"
run: |
export PATH=${PATH}:$(go env GOPATH)/bin
sh ./run_tests.sh

View File

@ -20,7 +20,7 @@ go version
# binary needed for RPC tests
env CC=gcc go build
cp "$REPO" "$GOPATH/bin/"
cp "$REPO" "$(go env GOPATH)/bin/"
# run tests on all modules
ROOTPATH=$(go list -m)