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} 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 ./... diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..060ae62 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,95 @@ +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 + dependsOn: fmt + 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 + dependsOn: coverage + displayName: "unit tests" + strategy: + maxParallel: 1 + 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)