sudo: false
language: go
go:
- 1.12.x
cache:
  directories:
  - "$GOPATH/pkg/dep"
env:
  global:
     - COMMIT=${TRAVIS_COMMIT::8}
before_script:
  - export TAG=`if [ "$TRAVIS_BRANCH" == "master" ] && [ -z "$TRAVIS_PULL_REQUEST_BRANCH" ]; then echo "latest"; elif [ "$TRAVIS_PULL_REQUEST_BRANCH" ]; then echo "$TRAVIS_PULL_REQUEST_BRANCH"; else echo "$TRAVIS_BRANCH"; fi`
before_deploy:
- CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -ldflags '-w -s' -a -installsuffix cgo -o che-machine-exec .
after_success:
- CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -ldflags '-w -s' -a -installsuffix cgo -o che-machine-exec .
script:
- git status
- export CHE_WORKSPACE_ID=test_id
- go test ./... -test.v
notifications:
  email: false
