From 039b484f44debd6ad65d8f9080ddd8160c91de51 Mon Sep 17 00:00:00 2001 From: Mat Byczkowski Date: Sat, 18 Apr 2020 20:06:57 -0700 Subject: [PATCH] Configure GitHub Actions GH Actions will build on every PR and every Push and perform the following: - go build - go test - integration tests - golanci-lint run There are some linter errors, so linter fails are currently being ignored, but they can be easily turned on once the code is fixed in a subsequent PR. --- .github/workflows/go.yml | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 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 0000000..e52f709 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,43 @@ +name: CI + +on: [push, pull_request] + +jobs: + + build: + name: Build + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.13 + uses: actions/setup-go@v1 + with: + go-version: 1.13 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Get dependencies + run: go mod download + + - name: Run tests + run: go test -v ./... + + - name: Build binaries + run: ./build + + - name: Run integration tests + run: ./integration_test + + lint: + name: Lint + runs-on: ubuntu-latest + steps: + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Run golangci-lint + uses: actions-contrib/golangci-lint@v1 + continue-on-error: true #TODO : fix linter errors