-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
35 lines (30 loc) · 1.21 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
language: minimal
dist: xenial
before_install:
- sudo apt-get install -y build-essential git python-pip sqlite3
- sudo apt-get install -y curl
# - curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
# - sudo apt-get install -y nodejs
# - sudo pip install requests
# - sudo npm install -g gulp
# - sudo npm install -g gulp-cli
- curl https://dl.google.com/go/go1.12.1.linux-amd64.tar.gz --output /tmp/go1.12.1.linux-amd64.tar.gz
- sudo tar -C /usr/local -zxf /tmp/go1.12.1.linux-amd64.tar.gz
script:
- export GOROOT=/usr/local/go
- export GOPATH=$HOME/go
- export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
- go version
- go get github.com/gorilla/mux
- go get github.com/stretchr/testify
- which go
- cd $TRAVIS_BUILD_DIR/server/source
- go build
- go test -race -coverprofile=coverage.txt -covermode=atomic ./...
before_deploy:
- export TRAVIS_TAG=${TRAVIS_TAG:-snapshot-$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)}
- export RESULTRA_DIST_BIN="./build/dest/docker/resultra.linux-amd64.tar.gz"
- export RESULTRA_DIST_BIN_TAGGED="resultra.linux-amd64.$TRAVIS_TAG.tar.gz"
- cp $RESULTRA_DIST_BIN $RESULTRA_DIST_BIN_TAGGED
after_success:
- bash <(curl -s https://codecov.io/bash)