diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 9f6f358..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,40 +0,0 @@ -version: 2 -machine: - docker_layer_caching: true -dependencies: - cache_directories: - - "~/docker-images" - - "/go/pkg/mod" -jobs: - build: - working_directory: /go/src/github.com/im-kulikov/helium - docker: - # CircleCI Go images available at: https://hub.docker.com/r/circleci/golang/ - - image: circleci/golang:1.11 - # CircleCI Redis images available at: https://hub.docker.com/r/circleci/redis/ - - image: circleci/redis:alpine - # CircleCI PostgreSQL images available at: https://hub.docker.com/r/circleci/postgres/ - - image: circleci/postgres:alpine-ram - environment: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: postgres - environment: - - GO111MODULE=on - steps: - - run: git config --global url.ssh://git@github.com/im-kulikov.insteadOf https://github.com/im-kulikov - - checkout - - restore_cache: - keys: - - go-mod-v1-{{ checksum "go.sum" }} - - run: - name: download-libraries - command: | - go mod tidy - go mod download - - save_cache: - key: go-mod-v1-{{ checksum "go.sum" }} - paths: - - "/go/pkg/mod" - - run: go test -v -cover -coverprofile=helium.coverprofile ./... - - run: bash -c "bash <(curl -s https://codecov.io/bash) -f helium.coverprofile -t $(CODECOV_TOKEN)" \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ccf0449 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +language: go +go: + - 1.11.x + - 1.12.x +env: + - GO111MODULE=on +install: + - go get -v golang.org/x/lint/golint + - go mod tidy -v +script: + - golint -set_exit_status ./... + - go test -coverprofile=coverage.txt -covermode=atomic ./... +after_success: + - bash <(curl -s https://codecov.io/bash) +matrix: + allow_failures: + - go: tip \ No newline at end of file diff --git a/README.md b/README.md index 2b4cd16..7b0611c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Helium ![Codecov](https://img.shields.io/codecov/c/github/im-kulikov/helium.svg?style=flat-square) -![CircleCI (all branches)](https://img.shields.io/circleci/project/github/im-kulikov/helium.svg?style=flat-square) +[![Build Status](https://travis-ci.com/im-kulikov/helium.svg?branch=master)](https://travis-ci.com/im-kulikov/helium) [![Report](https://goreportcard.com/badge/github.com/im-kulikov/helium)](https://goreportcard.com/report/github.com/im-kulikov/helium) [![GitHub release](https://img.shields.io/github/release/im-kulikov/helium.svg)](https://github.com/im-kulikov/helium) ![GitHub](https://img.shields.io/github/license/im-kulikov/helium.svg?style=popout) diff --git a/examples/demo4/main.go b/examples/demo4/main.go index e367e5e..e8bbcb8 100644 --- a/examples/demo4/main.go +++ b/examples/demo4/main.go @@ -45,7 +45,7 @@ func handler() http.Handler { return h } -func runner(s mserv.Server, l *zap.Logger, ctx context.Context) { +func runner(ctx context.Context, s mserv.Server, l *zap.Logger) { l.Info("run servers") s.Start()