add basic PR pipeline (#120)
This commit is contained in:
parent
89bb66b3a2
commit
1c2df2914b
31
.travis.yml
Normal file
31
.travis.yml
Normal file
@ -0,0 +1,31 @@
|
||||
language: go
|
||||
|
||||
go:
|
||||
- '1.8'
|
||||
- '1.9'
|
||||
- '1.10'
|
||||
- '1.11'
|
||||
- 'master'
|
||||
|
||||
# Skip the install step. Don't `go get` dependencies. Only build with the
|
||||
# code in vendor/
|
||||
install: true
|
||||
|
||||
matrix:
|
||||
# It's ok if our code fails on unstable development versions of Go.
|
||||
allow_failures:
|
||||
- go: master
|
||||
# Don't wait for tip tests to finish. Mark the test run green if the
|
||||
# tests pass on the stable versions of Go.
|
||||
fast_finish: true
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
before_script:
|
||||
- go get -t ./...
|
||||
|
||||
# Note: scripts always run to completion
|
||||
script:
|
||||
- make validate
|
||||
- make test
|
8
Makefile
8
Makefile
@ -11,7 +11,7 @@ run-large: build
|
||||
build:
|
||||
go build -o build/$(BIN)
|
||||
|
||||
release: test
|
||||
release: test validate
|
||||
./.scripts/tag.sh
|
||||
goreleaser --rm-dist
|
||||
|
||||
@ -21,6 +21,10 @@ install:
|
||||
test: build
|
||||
go test -cover -v ./...
|
||||
|
||||
validate:
|
||||
@! gofmt -s -d -l . 2>&1 | grep -vE '^\.git/'
|
||||
go vet ./...
|
||||
|
||||
lint: build
|
||||
golint -set_exit_status $$(go list ./...)
|
||||
|
||||
@ -29,4 +33,4 @@ clean:
|
||||
rm -rf vendor
|
||||
go clean
|
||||
|
||||
.PHONY: build install test lint clean release
|
||||
.PHONY: build install test lint clean release validate
|
||||
|
2
ui/ui.go
2
ui/ui.go
@ -194,7 +194,7 @@ func layout(g *gocui.Gui) error {
|
||||
logrus.Errorf("invalid config value: 'filetree.pane-width' should be 0 < value < 1, given '%v'", fileTreeSplitRatio)
|
||||
fileTreeSplitRatio = 0.5
|
||||
}
|
||||
splitCols := int(float64(maxX) * (1.0-fileTreeSplitRatio))
|
||||
splitCols := int(float64(maxX) * (1.0 - fileTreeSplitRatio))
|
||||
debugWidth := 0
|
||||
if debug {
|
||||
debugWidth = maxX / 4
|
||||
|
Loading…
x
Reference in New Issue
Block a user