-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
2,398 additions
and
521 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,60 @@ | ||
version: 2.1 | ||
|
||
executors: | ||
golang: | ||
parameters: | ||
version: | ||
description: Go version | ||
type: string | ||
docker: | ||
- image: circleci/golang:<< parameters.version >> | ||
|
||
commands: | ||
test: | ||
steps: | ||
- run: make | ||
- run: make test | ||
|
||
workflows: | ||
test: | ||
jobs: | ||
- go1_9 | ||
- go1_10 | ||
- go1_11 | ||
- go1_12 | ||
|
||
jobs: | ||
go1_12: &template | ||
executor: | ||
name: golang | ||
version: "1.12" | ||
steps: | ||
- checkout | ||
- test | ||
|
||
go1_11: | ||
<<: *template | ||
executor: | ||
name: golang | ||
version: "1.11" | ||
|
||
go1_10: &nomod_template | ||
<<: *template | ||
environment: | ||
GO111MODULE: off | ||
GO_COMMAND: vgo | ||
executor: | ||
name: golang | ||
version: "1.10" | ||
working_directory: /go/src/github.com/gbrlsnchs/jwt | ||
steps: | ||
- checkout | ||
- run: go get -u golang.org/x/crypto/ed25519 | ||
- run: go get -u golang.org/x/xerrors | ||
- test | ||
|
||
go1_9: | ||
<<: *nomod_template | ||
executor: | ||
name: golang | ||
version: "1.9" |
This file was deleted.
Oops, something went wrong.
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,30 +1,19 @@ | ||
install: export GO111MODULE := on | ||
install: | ||
current_dir := ${PWD} | ||
@cd ${GOPATH} | ||
go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.16.0 | ||
export GO111MODULE ?= on | ||
|
||
all: export GO111MODULE := off | ||
all: | ||
go get -u golang.org/x/tools/cmd/goimports | ||
go get -u golang.org/x/lint/golint | ||
|
||
lint: golint_cmd := golint -set_exit_status | ||
lint: | ||
@echo "+++ 'lint' (${golint_cmd})" | ||
@${golint_cmd} | ||
fix: | ||
@goimports -w *.go | ||
|
||
test-units: export GO111MODULE := on | ||
test-units: go_test_flags := -v -coverprofile=c.out | ||
ifdef GO_TEST_RUN | ||
test-units: go_test_flags += -run=${GO_TEST_RUN} | ||
endif | ||
test-units: GO_TEST_TARGET ?= ./... | ||
test-units: go_test_cmd := go test ${go_test_flags} ${GO_TEST_TARGET} | ||
test-units: | ||
@echo "+++ 'test-units' (${go_test_cmd})" | ||
@${go_test_cmd} | ||
lint: | ||
@! goimports -d . | grep -vF "no errors" | ||
@golint -set_exit_status ./... | ||
|
||
test-cover: export GO111MODULE := on | ||
test-cover: go_tool_cover := go tool cover -func=c.out | ||
test-cover: | ||
@echo "+++ 'test-cover' (${go_tool_cover})" | ||
@${go_tool_cover} | ||
bench: | ||
@go test -v -run=^$$ -bench=. | ||
|
||
test: test-units lint | ||
test: lint | ||
@go test -v ./... |
Oops, something went wrong.