-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* circle ci tests * build and test badges
- Loading branch information
1 parent
c8c7bb3
commit a105efc
Showing
5 changed files
with
82 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: 2.0 | ||
|
||
orbs: | ||
codecov: codecov/[email protected] | ||
|
||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/golang:1.12 | ||
steps: | ||
- checkout | ||
- run: | ||
name: "Create directories" | ||
command: | | ||
mkdir -p /tmp/artifacts | ||
- run: | ||
name: "Run tests and collect coverage reports" | ||
command: | | ||
make test | ||
mv coverage.html /tmp/artifacts | ||
mv c.out /tmp/artifacts | ||
- store_artifacts: | ||
path: /tmp/artifacts | ||
- run: | ||
name: Upload Coverage Results | ||
command: "bash <(curl -s https://codecov.io/bash) \ | ||
-f /tmp/artifacts/* \ | ||
-n ${CIRCLE_BUILD_NUM} \ | ||
-t ${CODECOV_TOKEN} \ | ||
-y .codecov.yml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.idea | ||
.env | ||
vendor | ||
vendor | ||
c.out | ||
coverage.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,17 @@ | ||
tests: | ||
go test ./... -v | ||
deps: | ||
go mod vendor | ||
.PHONY: deps | ||
|
||
lint: | ||
golint $(PKGS) | ||
.PHONY: lint | ||
|
||
test-unit: | ||
go test ./... --race --cover -count=1 -timeout 1s -coverprofile=c.out -v | ||
.PHONY: test-unit | ||
|
||
coverage-html: | ||
go tool cover -html=c.out -o coverage.html | ||
|
||
test: deps test-unit coverage-html | ||
.PHONY: test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters