Add Circle CI config and remove Travis CI config (#233)

Also update Makefile to build tools locally.
Similar to https://github.com/open-telemetry/rfcs/pull/14.
This commit is contained in:
Yang Song 2019-08-23 12:15:06 -07:00 committed by Bogdan Drutu
parent aba9d70747
commit 4d99871983
4 changed files with 28 additions and 31 deletions

12
.circleci/config.yml Normal file
View File

@ -0,0 +1,12 @@
version: 2
jobs:
build:
docker:
- image: circleci/golang:1.12
steps:
- checkout
- run:
name: Verify
command: make precommit

3
.gitignore vendored
View File

@ -21,3 +21,6 @@ bin
# Vim
.swp
# Misspell binary
.tools

View File

@ -1,17 +0,0 @@
language: go
cache:
directories:
- /home/travis/gopath/pkg/mod
go:
- 1.12.x
env:
global:
GO111MODULE=on
install:
- make install-tools
script:
- make travis-ci

View File

@ -1,21 +1,20 @@
# All documents to be used in spell check.
ALL_DOC := $(shell find . -name '*.md' -type f | sort)
MISSPELL=misspell -error
MISSPELL_CORRECTION=misspell -w
TOOLS_DIR := ./.tools
MISSPELL_BINARY=$(TOOLS_DIR)/misspell
.PHONY: travis-ci
travis-ci: misspell
.PHONY: precommit
precommit: install-misspell misspell
.PHONY: misspell
.PHONY: install-misspell
install-misspell: go.mod go.sum internal/tools.go
go build -o $(MISSPELL_BINARY) github.com/client9/misspell/cmd/misspell
.PHONY: misspell
misspell:
$(MISSPELL) $(ALL_DOC)
$(MISSPELL_BINARY) -error $(ALL_DOCS)
.PHONY: misspell-correction
.PHONY: misspell-correction
misspell-correction:
$(MISSPELL_CORRECTION) $(ALL_DOC)
.PHONY: install-tools
install-tools:
GO111MODULE=on go install \
github.com/client9/misspell/cmd/misspell
$(MISSPELL_BINARY) -w $(ALL_DOCS)