Skip to content

Commit 5b32bd4

Browse files
songy23bogdandrutu
authored andcommitted
Add Circle CI config and remove Travis CI config (open-telemetry#233)
Also update Makefile to build tools locally. Similar to open-telemetry/oteps#14.
1 parent 518dd7f commit 5b32bd4

File tree

5 files changed

+29
-32
lines changed

5 files changed

+29
-32
lines changed

.circleci/config.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
version: 2
3+
4+
jobs:
5+
build:
6+
docker:
7+
- image: circleci/golang:1.12
8+
steps:
9+
- checkout
10+
- run:
11+
name: Verify
12+
command: make precommit

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@ bin
2020
\#*\#
2121

2222
# Vim
23-
.swp
23+
.swp
24+
25+
# Misspell binary
26+
.tools

.travis.yml

-17
This file was deleted.

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ To check for typos, use
2626

2727
```bash
2828
# Golang is needed for the misspell tool.
29-
make install-tools
29+
make install-misspell
3030
make misspell
3131
```
3232

Makefile

+12-13
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
# All documents to be used in spell check.
22
ALL_DOC := $(shell find . -name '*.md' -type f | sort)
33

4-
MISSPELL=misspell -error
5-
MISSPELL_CORRECTION=misspell -w
4+
TOOLS_DIR := ./.tools
5+
MISSPELL_BINARY=$(TOOLS_DIR)/misspell
66

7-
.PHONY: travis-ci
8-
travis-ci: misspell
7+
.PHONY: precommit
8+
precommit: install-misspell misspell
99

10-
.PHONY: misspell
10+
.PHONY: install-misspell
11+
install-misspell: go.mod go.sum internal/tools.go
12+
go build -o $(MISSPELL_BINARY) github.com/client9/misspell/cmd/misspell
13+
14+
.PHONY: misspell
1115
misspell:
12-
$(MISSPELL) $(ALL_DOC)
16+
$(MISSPELL_BINARY) -error $(ALL_DOCS)
1317

14-
.PHONY: misspell-correction
18+
.PHONY: misspell-correction
1519
misspell-correction:
16-
$(MISSPELL_CORRECTION) $(ALL_DOC)
17-
18-
.PHONY: install-tools
19-
install-tools:
20-
GO111MODULE=on go install \
21-
github.com/client9/misspell/cmd/misspell
20+
$(MISSPELL_BINARY) -w $(ALL_DOCS)

0 commit comments

Comments
 (0)