Remove travis-ci config
This commit is contained in:
parent
05200bdf83
commit
7728c9b990
|
@ -39,3 +39,24 @@ jobs:
|
||||||
env:
|
env:
|
||||||
GO111MODULE: on
|
GO111MODULE: on
|
||||||
run: ./_example/build.sh
|
run: ./_example/build.sh
|
||||||
|
|
||||||
|
lint:
|
||||||
|
name: Run lint checks
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Set up Go 1.14
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.14
|
||||||
|
id: go
|
||||||
|
- name: Check out code into the Go module directory
|
||||||
|
uses: actions/checkout@master
|
||||||
|
- name: Download golangci-lint
|
||||||
|
run: |
|
||||||
|
wget https://github.com/golangci/golangci-lint/releases/download/v1.20.1/golangci-lint-1.20.1-linux-amd64.tar.gz
|
||||||
|
tar -xvf ./golangci-lint-1.20.1-linux-amd64.tar.gz
|
||||||
|
- name: Running golangci-lint
|
||||||
|
env:
|
||||||
|
GO111MODULE: on
|
||||||
|
GOPATH: /home/runner/work/
|
||||||
|
run: GOCILINT=${GOPATH}/bin/golangci-lint make lint
|
||||||
|
|
50
.travis.yml
50
.travis.yml
|
@ -1,50 +0,0 @@
|
||||||
sudo: false
|
|
||||||
language: go
|
|
||||||
|
|
||||||
go:
|
|
||||||
- "1.11.x"
|
|
||||||
- tip
|
|
||||||
|
|
||||||
os:
|
|
||||||
- linux
|
|
||||||
- osx
|
|
||||||
- windows
|
|
||||||
|
|
||||||
env:
|
|
||||||
- GO111MODULE=on
|
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- $GOPATH/pkg/mod/cache
|
|
||||||
|
|
||||||
install:
|
|
||||||
- GO111MODULE=off go get -u golang.org/x/lint/golint
|
|
||||||
- GO111MODULE=off go get -u golang.org/x/tools/cmd/goimports
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- lint
|
|
||||||
- examples
|
|
||||||
- test
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
include:
|
|
||||||
- stage: lint
|
|
||||||
script:
|
|
||||||
- diff <(goimports -d $(find . -type f -name '*.go')) <(echo -n "")
|
|
||||||
- make lint
|
|
||||||
go: "1.11.x"
|
|
||||||
os: osx
|
|
||||||
- stage: examples
|
|
||||||
script:
|
|
||||||
- ./_example/build.sh
|
|
||||||
go: "1.11.x"
|
|
||||||
os: osx
|
|
||||||
|
|
||||||
script:
|
|
||||||
- go test -race ./...
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
fast_finish: true
|
|
||||||
allow_failures:
|
|
||||||
- go: tip
|
|
||||||
- os: windows
|
|
13
Makefile
13
Makefile
|
@ -1,22 +1,23 @@
|
||||||
.DEFAULT_GOAL := help
|
.DEFAULT_GOAL := help
|
||||||
|
|
||||||
PKGS := $(shell go list ./...)
|
|
||||||
SOURCES := $(shell find . -prune -o -name "*.go" -not -name '*_test.go' -print)
|
SOURCES := $(shell find . -prune -o -name "*.go" -not -name '*_test.go' -print)
|
||||||
|
|
||||||
|
GOIMPORTS ?= goimports
|
||||||
|
GOCILINT ?= golangci-lint
|
||||||
|
|
||||||
.PHONY: setup
|
.PHONY: setup
|
||||||
setup: ## Setup for required tools.
|
setup: ## Setup for required tools.
|
||||||
go get -u golang.org/x/lint/golint
|
|
||||||
go get -u golang.org/x/tools/cmd/goimports
|
go get -u golang.org/x/tools/cmd/goimports
|
||||||
|
go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
|
||||||
go get -u golang.org/x/tools/cmd/stringer
|
go get -u golang.org/x/tools/cmd/stringer
|
||||||
|
|
||||||
.PHONY: fmt
|
.PHONY: fmt
|
||||||
fmt: $(SOURCES) ## Formatting source codes.
|
fmt: $(SOURCES) ## Formatting source codes.
|
||||||
@goimports -w $^
|
@$(GOIMPORTS) -w $^
|
||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint: ## Run golint and go vet.
|
lint: ## Run golangci-lint.
|
||||||
@golint -set_exit_status=1 $(PKGS)
|
@$(GOCILINT) run --no-config --disable-all --enable=goimports --enable=misspell ./...
|
||||||
@go vet $(PKGS)
|
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: ## Run tests with race condition checking.
|
test: ## Run tests with race condition checking.
|
||||||
|
|
Loading…
Reference in New Issue