From 077062094e4857b01e34faefd7e490ee484e495d Mon Sep 17 00:00:00 2001 From: Joshua Moravec Date: Fri, 11 Mar 2022 15:29:35 -0600 Subject: [PATCH 1/3] Move to Github Actions from TravisCI --- .github/workflows/go.yml | 42 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 40 -------------------------------------- 2 files changed, 42 insertions(+), 40 deletions(-) create mode 100644 .github/workflows/go.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..dcbd652 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,42 @@ +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", "1.11.x", "1.12.x", "1.13.x", "1.14.x", "1.15.x", "1.16.x", "1.17.x" ] + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go }} + + - name: Setup Go + run: | + curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep + chmod +x $GOPATH/bin/dep + + - 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 From 7d6d9f346ebceff41310744a0c9706412c00281f Mon Sep 17 00:00:00 2001 From: Joshua Moravec Date: Fri, 11 Mar 2022 15:32:35 -0600 Subject: [PATCH 2/3] Remove newer versions --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index dcbd652..bc4a6a1 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go: [ "1.9.x", "1.10.x", "1.11.x", "1.12.x", "1.13.x", "1.14.x", "1.15.x", "1.16.x", "1.17.x" ] + go: [ "1.9.x", "1.10.x" ] steps: - uses: actions/checkout@v2 From b9e735400911d4ffaf834b39d10404ef449954f7 Mon Sep 17 00:00:00 2001 From: Joshua Moravec Date: Fri, 11 Mar 2022 15:33:50 -0600 Subject: [PATCH 3/3] Remove dep download --- .github/workflows/go.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index bc4a6a1..15b4877 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -24,11 +24,6 @@ jobs: with: go-version: ${{ matrix.go }} - - name: Setup Go - run: | - curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep - chmod +x $GOPATH/bin/dep - - name: Install Dependencies run: go get -t -v ./...