Skip to content

Instantly share code, notes, and snippets.

@rjeczalik
Last active August 29, 2015 14:04
Show Gist options
  • Save rjeczalik/709e93011bd66152e022 to your computer and use it in GitHub Desktop.
Save rjeczalik/709e93011bd66152e022 to your computer and use it in GitHub Desktop.
CI configuration templates for Go projects
language: go
go:
- 1.3.1
- tip
matrix:
fast_finish: true
env:
global:
- PATH=$HOME/gopath/bin:$PATH
- secure: "COVERALLS_TOKEN=..."
install:
- go get code.google.com/p/go.tools/cmd/vet code.google.com/p/go.tools/cmd/cover github.com/mattn/goveralls github.com/modocache/gover
- go get -t -v ./...
- go install -a -race std
script:
- go tool vet -all .
- go build ./...
- go test -race -v ./...
- go list -f '{{if len .TestGoFiles}}go test -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}{{end}}' ./... | xargs -i sh -c {}
- gover
- goveralls -coverprofile=gover.coverprofile -service=travis-ci -repotoken $COVERALLS_TOKEN
language: objective-c
env:
global:
- GOPATH=$HOME
- PATH=$HOME/bin:$PATH
install:
- mkdir -p ~/src/github.com
- mv ../../rjeczalik ~/src/github.com
- cd ~/src/github.com/rjeczalik/bin
- go version
- go get code.google.com/p/go.tools/cmd/vet
- go get -v -t ./...
- go install -a -race std
script:
- go tool vet -all .
- go build ./...
- go test -race -v ./...
version: "{build}"
os: Windows Server 2012 R2
clone_folder: c:\projects\src\github.com\rjeczalik\bin
environment:
GOPATH: c:\projects
install:
- set PATH=%GOPATH%\bin;%PATH%
- cd %APPVEYOR_BUILD_FOLDER%
- go version
- go get code.google.com/p/go.tools/cmd/vet
- go get -v -t ./...
build_script:
- go tool vet -all .
- go build ./...
- go test -race -v ./...
test: off
deploy: off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment