From 3284930af8a5ca033f6dc2b9d08acc3d3872d22a Mon Sep 17 00:00:00 2001 From: James Bowes Date: Mon, 19 Jul 2021 19:47:58 -0300 Subject: [PATCH 1/6] Use github actions instead of travis travis isn't working anymore. easier to switch than to debug. --- .github/workflows/go.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 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..b56312c --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,25 @@ +name: Go + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... From b3a1dd072070872e88d524ac47d3c64fe6284794 Mon Sep 17 00:00:00 2001 From: James Bowes Date: Mon, 19 Jul 2021 19:50:45 -0300 Subject: [PATCH 2/6] add golangci-lint --- .github/workflows/golangci-lint.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/golangci-lint.yaml diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml new file mode 100644 index 0000000..303c724 --- /dev/null +++ b/.github/workflows/golangci-lint.yaml @@ -0,0 +1,19 @@ +name: golangci-lint +on: + push: + tags: + - v* + branches: + - master + - main + pull_request: +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + version: latest From 56d940387aa6f21f493f187a6aa3620537fa8f9c Mon Sep 17 00:00:00 2001 From: James Bowes Date: Mon, 19 Jul 2021 19:55:49 -0300 Subject: [PATCH 3/6] Upload coverage to codecov --- .github/workflows/go.yml | 5 ++++- .github/workflows/{golangci-lint.yaml => golangci-lint.yml} | 0 2 files changed, 4 insertions(+), 1 deletion(-) rename .github/workflows/{golangci-lint.yaml => golangci-lint.yml} (100%) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index b56312c..55106c9 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -22,4 +22,7 @@ jobs: run: go build -v ./... - name: Test - run: go test -v ./... + run: go test -v ./... -race -coverprofile=coverage.txt -covermode=atomic + + - name: Upload coverage to Codecov + run: bash <(curl -s https://codecov.io/bash) diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yml similarity index 100% rename from .github/workflows/golangci-lint.yaml rename to .github/workflows/golangci-lint.yml From 28c3c571724e52912c228b857d51d481abfd8546 Mon Sep 17 00:00:00 2001 From: James Bowes Date: Mon, 19 Jul 2021 19:57:02 -0300 Subject: [PATCH 4/6] Remove travis yaml --- .travis.yml | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8dacd38..0000000 --- a/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -dist: xenial -language: go - -# Force-enable Go modules. Also force go to use the code in vendor/ -# These will both be unnecessary when Go 1.13 lands. -env: - global: - - GO111MODULE=on - -go: - - "1.12.x" - - "1.13.x" - -git: - depth: 1 - -# Skip the install step. Don't `go get` dependencies. Only build with the code -# in vendor/ -install: true - -# Anything in before_script that returns a nonzero exit code will flunk the -# build and immediately stop. It's sorta like having set -e enabled in bash. -# Make sure golangci-lint is vendored. -before_script: - - go install github.com/golangci/golangci-lint/cmd/golangci-lint - -script: - - golangci-lint run # run a bunch of code checkers/linters in parallel - - go test -race -coverpkg ./... -coverprofile coverage.txt ./... - -after_success: - - bash <(curl -s https://codecov.io/bash) From 689d56d9a76e69d7a4af835958bb809c1eb64b42 Mon Sep 17 00:00:00 2001 From: James Bowes Date: Mon, 19 Jul 2021 20:04:16 -0300 Subject: [PATCH 5/6] Put linter workflow in main actions file --- .github/workflows/go.yml | 10 ++++++++++ .github/workflows/golangci-lint.yml | 19 ------------------- 2 files changed, 10 insertions(+), 19 deletions(-) delete mode 100644 .github/workflows/golangci-lint.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 55106c9..f725f24 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -26,3 +26,13 @@ jobs: - name: Upload coverage to Codecov run: bash <(curl -s https://codecov.io/bash) + + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + version: latest diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml deleted file mode 100644 index 303c724..0000000 --- a/.github/workflows/golangci-lint.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: golangci-lint -on: - push: - tags: - - v* - branches: - - master - - main - pull_request: -jobs: - golangci: - name: lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: golangci-lint - uses: golangci/golangci-lint-action@v2 - with: - version: latest From cd5e1c865bfdf7d3dab0e78c1b7728b28460a993 Mon Sep 17 00:00:00 2001 From: James Bowes Date: Mon, 19 Jul 2021 20:12:49 -0300 Subject: [PATCH 6/6] update badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0aa1e95..1e97254 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@
GoDoc Alpha Quality - Build Status + Build Status GitHub tag BSD license codecov