Remove travis-ci config

This commit is contained in:
c-bata 2020-09-19 00:04:52 +09:00
parent 05200bdf83
commit 7728c9b990
3 changed files with 28 additions and 56 deletions

View File

@ -39,3 +39,24 @@ jobs:
env:
GO111MODULE: on
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

View File

@ -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

View File

@ -1,22 +1,23 @@
.DEFAULT_GOAL := help
PKGS := $(shell go list ./...)
SOURCES := $(shell find . -prune -o -name "*.go" -not -name '*_test.go' -print)
GOIMPORTS ?= goimports
GOCILINT ?= golangci-lint
.PHONY: setup
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 github.com/golangci/golangci-lint/cmd/golangci-lint
go get -u golang.org/x/tools/cmd/stringer
.PHONY: fmt
fmt: $(SOURCES) ## Formatting source codes.
@goimports -w $^
@$(GOIMPORTS) -w $^
.PHONY: lint
lint: ## Run golint and go vet.
@golint -set_exit_status=1 $(PKGS)
@go vet $(PKGS)
lint: ## Run golangci-lint.
@$(GOCILINT) run --no-config --disable-all --enable=goimports --enable=misspell ./...
.PHONY: test
test: ## Run tests with race condition checking.