Use jobs
This commit is contained in:
parent
0385870b84
commit
7d8e5da368
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,6 +2,7 @@
|
|||||||
*.o
|
*.o
|
||||||
*.a
|
*.a
|
||||||
*.so
|
*.so
|
||||||
|
bin/
|
||||||
|
|
||||||
# Folders
|
# Folders
|
||||||
pkg/
|
pkg/
|
||||||
|
45
.travis.yml
45
.travis.yml
@ -1,22 +1,41 @@
|
|||||||
sudo: false
|
sudo: false
|
||||||
language: go
|
language: go
|
||||||
|
|
||||||
os:
|
|
||||||
- linux
|
|
||||||
- osx
|
|
||||||
- windows
|
|
||||||
|
|
||||||
go:
|
|
||||||
- "1.11.x"
|
|
||||||
- master
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
allow_failures:
|
|
||||||
- go: master
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- make setup
|
- 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:
|
script:
|
||||||
- go build ./_example/simple-echo/main.go
|
- go build ./_example/simple-echo/main.go
|
||||||
- diff <(goimports -d $(find . -type f -name '*.go' -not -path "./vendor/*")) <(echo -n "")
|
- 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 test -coverprofile=coverage.o
|
||||||
@go tool cover -func=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
|
.PHONY: help
|
||||||
help: ## Show help text
|
help: ## Show help text
|
||||||
@echo "Commands:"
|
@echo "Commands:"
|
||||||
|
Loading…
Reference in New Issue
Block a user