Use jobs
This commit is contained in:
parent
0385870b84
commit
7d8e5da368
|
@ -2,6 +2,7 @@
|
|||
*.o
|
||||
*.a
|
||||
*.so
|
||||
bin/
|
||||
|
||||
# Folders
|
||||
pkg/
|
||||
|
|
45
.travis.yml
45
.travis.yml
|
@ -1,22 +1,41 @@
|
|||
sudo: false
|
||||
language: go
|
||||
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
- windows
|
||||
|
||||
go:
|
||||
- "1.11.x"
|
||||
- master
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- go: master
|
||||
|
||||
install:
|
||||
- make setup
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: Lint
|
||||
script:
|
||||
- go build ./_example/simple-echo/main.go
|
||||
- diff <(goimports -d $(find . -type f -name '*.go' -not -path "./vendor/*")) <(echo -n "")
|
||||
- make lint
|
||||
go: "1.11.x"
|
||||
os: osx
|
||||
- stage: Build
|
||||
script:
|
||||
- make build
|
||||
go:
|
||||
- "1.11.x"
|
||||
- tip
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
- windows
|
||||
- stage: Unit Test
|
||||
script:
|
||||
- make test
|
||||
go:
|
||||
- "1.11.x"
|
||||
- tip
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
- windows
|
||||
allow_failures:
|
||||
- go: tip
|
||||
|
||||
script:
|
||||
- go build ./_example/simple-echo/main.go
|
||||
- diff <(goimports -d $(find . -type f -name '*.go' -not -path "./vendor/*")) <(echo -n "")
|
||||
|
|
8
Makefile
8
Makefile
|
@ -27,6 +27,14 @@ cover: ## Run the tests.
|
|||
@go test -coverprofile=coverage.o
|
||||
@go tool cover -func=coverage.o
|
||||
|
||||
.PHONY: build
|
||||
build: ## Build example command lines.
|
||||
go build -o bin/exec-command ./_example/exec-command/main.go
|
||||
go build -o bin/http-prompt ./_example/http-prompt/main.go
|
||||
go build -o bin/live-prefix ./_example/live-prefix/main.go
|
||||
go build -o bin/simple-echo ./_example/simple-echo/main.go
|
||||
go build -o bin/simple-echo-cjk-cyrillic ./_example/simple-echo/cjk-cyrillic/main.go
|
||||
|
||||
.PHONY: help
|
||||
help: ## Show help text
|
||||
@echo "Commands:"
|
||||
|
|
Loading…
Reference in New Issue