From 4d9987198391977fc12313f2bf055eef5ade8ce0 Mon Sep 17 00:00:00 2001 From: Yang Song Date: Fri, 23 Aug 2019 12:15:06 -0700 Subject: [PATCH] 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. --- .circleci/config.yml | 12 ++++++++++++ .gitignore | 5 ++++- .travis.yml | 17 ----------------- Makefile | 25 ++++++++++++------------- 4 files changed, 28 insertions(+), 31 deletions(-) create mode 100644 .circleci/config.yml delete mode 100644 .travis.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..5b022c6dd --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,12 @@ + +version: 2 + +jobs: + build: + docker: + - image: circleci/golang:1.12 + steps: + - checkout + - run: + name: Verify + command: make precommit diff --git a/.gitignore b/.gitignore index 8f301c3aa..cb3a52519 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,7 @@ bin \#*\# # Vim -.swp \ No newline at end of file +.swp + +# Misspell binary +.tools \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a5c5d1773..000000000 --- a/.travis.yml +++ /dev/null @@ -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 diff --git a/Makefile b/Makefile index f08203cde..0416c3f27 100644 --- a/Makefile +++ b/Makefile @@ -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) \ No newline at end of file