Last active
May 30, 2019 17:37
-
-
Save som-poddar/27968537a731df01e6dab8cd2f1a703f to your computer and use it in GitHub Desktop.
Setting Up Travis CI with Ginkgo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: go | |
go: | |
- 1.10.x | |
install: | |
- go get github.com/golang/dep | |
- go get golang.org/x/tools/cmd/cover | |
- go get github.com/onsi/gomega | |
- go install github.com/onsi/ginkgo/ginkgo | |
- export PATH=$PATH:$HOME/gopath/bin | |
- dep ensure | |
- go build | |
script: $HOME/gopath/bin/ginkgo -r --randomizeAllSpecs --randomizeSuites --race --trace && go vet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: go | |
go: | |
- 1.11.x | |
# Force-disable Go modules. Force go to use the code in vendor/ | |
env: | |
- GO111MODULE=off | |
- GOFLAGS='-mod vendor' | |
cache: | |
directories: | |
- $TRAVIS_BUILD_DIR/vendor | |
git: | |
depth: 1 | |
before_install: | |
# Setup dependency management tool | |
- curl -L -s https://github.com/golang/dep/releases/download/v0.3.1/dep-linux-amd64 -o $GOPATH/bin/dep | |
- chmod +x $GOPATH/bin/dep | |
install: | |
- dep ensure | |
before_script: | |
# for future use | |
# - go install github.com/golangci/golangci-lint/cmd/golangci-lint | |
script: | |
- make ci-all | |
notifications: | |
# slack: org:key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: go | |
go: | |
- 1.12.x | |
env: | |
- DEP_VERSION="0.5.1" | |
- CODECOV_TOKEN="084b2a38-5792-441b-96ae-9097ad9b5738" | |
cache: | |
directories: | |
- $TRAVIS_BUILD_DIR/vendor | |
git: | |
depth: 1 | |
before_install: | |
- curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep | |
- chmod +x $GOPATH/bin/dep | |
install: | |
- dep ensure | |
- go get github.com/onsi/ginkgo/ginkgo | |
- go get -v -t ./... | |
- go get github.com/onsi/gomega/... | |
script: | |
- ginkgo -r --randomizeAllSpecs --randomizeSuites --failOnPending --cover --trace --race --progress | |
- go vet | |
after_success: | |
- bash <(curl -s https://codecov.io/bash) CODECOV_TOKEN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment