Skip to content

Commit

Permalink
update ci config
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilsk committed Aug 17, 2019
1 parent db41bd9 commit ad97253
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ env:
global:
- CODECLIMATE=https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
- GO111MODULE=on
- GOFLAGS=-mod=vendor

go:
- master
Expand Down
18 changes: 5 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SHELL = /bin/bash -euo pipefail
PKGS = go list ./... | grep -v vendor
PKGS = $(shell go list ./... | grep -v vendor)
GO111MODULE = on
GOFLAGS = -mod=vendor
TIMEOUT = 1s
Expand All @@ -23,28 +23,20 @@ format:

.PHONY: generate
generate:
@go generate ./...
@go generate $(PKGS)

.PHONY: refresh
refresh: generate format


.PHONY: test
test:
@go test -race -timeout $(TIMEOUT) ./...
@go test -race -timeout $(TIMEOUT) $(PKGS)

.PHONY: test-with-coverage
test-with-coverage:
@go test -cover -timeout $(TIMEOUT) ./... | column -t | sort -r
@go test -cover -timeout $(TIMEOUT) $(PKGS) | column -t | sort -r

.PHONY: test-with-coverage-profile
test-with-coverage-profile:
@go test -cover -covermode count -coverprofile c.out -timeout $(TIMEOUT) ./...


.PHONY: sync
sync:
@git stash && git pull --rebase && git stash pop || true

.PHONY: upgrade
upgrade: sync update deps refresh test-with-coverage
@go test -cover -covermode count -coverprofile c.out -timeout $(TIMEOUT) $(PKGS)
8 changes: 4 additions & 4 deletions caller.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ func Caller(skip int) CallerInfo {

// CallerInfo holds information about a caller.
type CallerInfo struct {
Entry uintptr
Name string
File string
Line int
Entry uintptr // the entry address of the function
Name string // the name of the function
File string // the file name and
Line int // line number of the source code of the function
}

0 comments on commit ad97253

Please sign in to comment.