Skip to content

Commit

Permalink
Add Circle CI config and remove Travis CI config (open-telemetry#233)
Browse files Browse the repository at this point in the history
Also update Makefile to build tools locally.
Similar to open-telemetry/oteps#14.
  • Loading branch information
songy23 authored and bogdandrutu committed Aug 23, 2019
1 parent 518dd7f commit 5b32bd4
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 32 deletions.
12 changes: 12 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

version: 2

jobs:
build:
docker:
- image: circleci/golang:1.12
steps:
- checkout
- run:
name: Verify
command: make precommit
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ bin
\#*\#

# Vim
.swp
.swp

# Misspell binary
.tools
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To check for typos, use

```bash
# Golang is needed for the misspell tool.
make install-tools
make install-misspell
make misspell
```

Expand Down
25 changes: 12 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 5b32bd4

Please sign in to comment.