From 84990eec54b14d811f57050d655ef1b31adde27b Mon Sep 17 00:00:00 2001 From: Mahendra Kanani Date: Sun, 14 Mar 2021 01:46:58 +0530 Subject: [PATCH 1/4] added azure-pipelines.yml --- azure-pipelines.yml | 92 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..1f0257e --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,92 @@ +trigger: +- master + +stages: +- stage: run_checks + displayName: "Check" + dependsOn: [] + jobs: + - job: fmt + displayName: "fmt" + pool: + vmImage: ubuntu-latest + steps: + - task: GoTool@0 + displayName: "Install Go 1.16" + inputs: + version: "1.16" + - task: Go@0 + displayName: "go fmt ./..." + inputs: + command: 'custom' + customCommand: 'fmt' + arguments: './...' + - job: coverage + displayName: "coverage" + pool: + vmImage: ubuntu-latest + steps: + - task: GoTool@0 + displayName: "Install Go 1.16" + inputs: + version: "1.16" + - task: Go@0 + displayName: "Generate coverage" + inputs: + command: 'test' + arguments: "-race -coverprofile=coverage.txt -covermode=atomic" + - task: Bash@3 + inputs: + targetType: 'inline' + script: 'bash <(curl -s https://codecov.io/bash) -t ${CODECOV_TOKEN}' + env: + CODECOV_TOKEN: $(CODECOV_TOKEN) + - job: go_unit_tests + displayName: "unit tests" + strategy: + matrix: + linux_amd64 1.16: + goVersion: '1.16' + imageName: 'ubuntu-latest' + GOOS: linux + GOARCH: amd64 + mac_amd64 1.16: + goVersion: '1.16' + imageName: 'macOS-latest' + GOOS: darwin + GOARCH: amd64 + windows_amd64 1.16: + goVersion: '1.16' + imageName: 'windows-latest' + GOOS: windows + GOARCH: amd64 + linux_amd64 1.9: + goVersion: '1.9' + imageName: 'ubuntu-latest' + GOOS: linux + GOARCH: amd64 + mac_amd64 1.9: + goVersion: '1.9' + imageName: 'macOS-latest' + GOOS: darwin + GOARCH: amd64 + windows_amd64 1.9: + goVersion: '1.9' + imageName: 'windows-latest' + GOOS: windows + GOARCH: amd64 + pool: + vmImage: $(imageName) + steps: + - task: GoTool@0 + displayName: "Install Go $(goVersion)" + inputs: + version: $(goVersion) + - task: Go@0 + displayName: "go test ./..." + inputs: + command: 'test' + arguments: './...' + env: + go.goos: $(GOOS) + go.goarch: $(GOARCH) From da16ae6ba3b7d674755bb08d7bd70d597984654a Mon Sep 17 00:00:00 2001 From: Mahendra Kanani Date: Sun, 14 Mar 2021 02:27:01 +0530 Subject: [PATCH 2/4] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1f0257e..060ae62 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,6 +22,7 @@ stages: customCommand: 'fmt' arguments: './...' - job: coverage + dependsOn: fmt displayName: "coverage" pool: vmImage: ubuntu-latest @@ -42,8 +43,10 @@ stages: env: CODECOV_TOKEN: $(CODECOV_TOKEN) - job: go_unit_tests + dependsOn: coverage displayName: "unit tests" strategy: + maxParallel: 1 matrix: linux_amd64 1.16: goVersion: '1.16' From 772da8891632d2be6b6be95ffdfa5183216b5dc1 Mon Sep 17 00:00:00 2001 From: Mahendra Kanani Date: Sat, 27 Mar 2021 19:29:08 +0530 Subject: [PATCH 3/4] Updated config.yml --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5f5f083..6a261a0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,7 +21,7 @@ jobs: name: run test command: | go get -v -t -d ./... - GO111MODULE=off go get github.com/mattn/goveralls + go get github.com/mattn/goveralls go test -v -cover -coverprofile=coverage.out $GOPATH/bin/goveralls -coverprofile=coverage.out -service=circle-ci -repotoken=$COVERALLS_TOKEN @@ -32,6 +32,6 @@ workflows: # - build - test -#notify: -# webhooks: -# - url: https://coveralls.io/webhook?repo_token=${process.env.COVERALLS_REPO_TOKEN} +notify: + webhooks: + - url: https://coveralls.io/webhook?repo_token=${process.env.COVERALLS_REPO_TOKEN} From ca2495209f4b5a6f71fac254595767288fb05a21 Mon Sep 17 00:00:00 2001 From: Mahendra Kanani Date: Sun, 11 Apr 2021 15:27:06 +0530 Subject: [PATCH 4/4] disabled travis --- .travis.yml | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.travis.yml b/.travis.yml index f19635c..a7c43db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,27 +1,27 @@ --- -language: go -go: - - 1.9 - - 1.10 - - 1.11 - - 1.12 - - 1.13 - - 1.14 - - 1.15 - - tip +# language: go +# go: +# - 1.9 +# - 1.10 +# - 1.11 +# - 1.12 +# - 1.13 +# - 1.14 +# - 1.15 +# - tip -before_install: - - go get github.com/mattn/goveralls - - go get github.com/axw/gocov/gocov - - go get github.com/mattn/goveralls - - go get golang.org/x/crypto/nacl/secretbox - - go get golang.org/x/tools/cmd/cover - - go get -v -t -d ./... +# before_install: +# - go get github.com/mattn/goveralls +# - go get github.com/axw/gocov/gocov +# - go get github.com/mattn/goveralls +# - go get golang.org/x/crypto/nacl/secretbox +# - go get golang.org/x/tools/cmd/cover +# - go get -v -t -d ./... -install: - #- $HOME/gopath/bin/goveralls -service=travis-ci -repotoken=$COVERALLS_TOKEN - - goveralls -service=travis-ci -repotoken=$COVERALLS_TOKEN +# install: +# #- $HOME/gopath/bin/goveralls -service=travis-ci -repotoken=$COVERALLS_TOKEN +# - goveralls -service=travis-ci -repotoken=$COVERALLS_TOKEN -script: - - go test -v ./... - - go test -bench -v ./... +# script: +# - go test -v ./... +# - go test -bench -v ./...