Skip to content

Commit

Permalink
Merge pull request #5 from vansante/ci
Browse files Browse the repository at this point in the history
Add circle ci config for testing and codequality
  • Loading branch information
vansante authored Dec 17, 2018
2 parents cd27bc5 + 6d0feb1 commit 88406fa
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: 2.1

executors:
go:
docker:
- image: circleci/golang:1.11
environment:
GOPATH: /home/circleci/go

jobs:
codequality:
executor: go
steps:
- checkout
- run: go get golang.org/x/lint/golint # Download & install golint
- run: "! gofmt -d . | read || ( gofmt -d . && exit 1 )" # Run go format
- run: ~/go/bin/golint -set_exit_status ./... # Run go linter
- run: go vet ./... # Run go vet

test:
executor: go
steps:
- checkout
- run: go get github.com/jstemmer/go-junit-report
- run: mkdir -p /tmp/test-results
- run: go test -v -race ./... | ~/go/bin/go-junit-report > /tmp/test-results/spec.xml
- store_test_results:
path: /tmp/test-results

workflows:
version: 2
main:
jobs:
- codequality
- test

0 comments on commit 88406fa

Please sign in to comment.