diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..15b4877 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,37 @@ +name: Go + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + DEP_VERSION: "0.5.0" + +jobs: + + build: + runs-on: ubuntu-latest + strategy: + matrix: + go: [ "1.9.x", "1.10.x" ] + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go }} + + - name: Install Dependencies + run: go get -t -v ./... + + - name: Gofmt + run: diff -u <(echo -n) <(gofmt -d .) + + - name: Test + run: go test -v -race ./... + + - name: Vet + run: go vet ./... diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e76eb6e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,40 +0,0 @@ -language: go - -# workaround for case sensitive build issues with wavefrontHQ -go_import_path: github.com/wavefronthq/wavefront-lambda-go - -go: - - "1.9.x" - - "1.10.x" - - master - -env: - - DEP_VERSION="0.5.0" - -before_install: -# Download the binary to bin folder in $GOPATH -- curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep -# Make the binary executable -- chmod +x $GOPATH/bin/dep - -install: - - dep ensure - -matrix: - # It's ok if our code fails on unstable development versions of Go. - allow_failures: - - go: master - # Don't wait for tip tests to finish. Mark the test run green if the - # tests pass on the stable versions of Go. - fast_finish: true - -# Don't email me the results of the test runs. -notifications: - email: false - -# script always run to completion (set +e). -script: - - go get -t -v ./... - - diff -u <(echo -n) <(gofmt -d .) - - go test -v -race ./... # Run all the tests with the race detector enabled - - go vet ./... # go vet is the official Go static analyzer