-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
36 lines (31 loc) · 1.08 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
36
language: go
go:
- "1.17"
services:
- docker
before_install:
- go get github.com/mattn/goveralls
- $TRAVIS_BUILD_DIR/travis/install_gcloud.sh
- source "${HOME}/google-cloud-sdk/path.bash.inc"
- if [[ -n "$SERVICE_ACCOUNT_mlab_testing" ]] ; then
echo "$SERVICE_ACCOUNT_mlab_testing" > $TRAVIS_BUILD_DIR/creds.json ;
export GOOGLE_APPLICATION_CREDENTIALS=$TRAVIS_BUILD_DIR/creds.json ;
echo "TESTING CREDS FOUND" ;
else echo "NO TESTING CREDS FOUND" ;
fi
cache:
directories:
- "$HOME/google-cloud-sdk/"
script:
# This assumes we never have a file named __coverage.cov checked in. A
# good assumption, but one we should note.
- GCLOUD_PROJECT=mlab-testing
go test -v -covermode=count -coverprofile=__coverage.cov -coverpkg=./... ./...
- $HOME/gopath/bin/goveralls -coverprofile=__coverage.cov -service=travis-ci
- docker build -t pushertest .
- mkdir fakedata;
docker run
-v `pwd`/fakedata:/var/spool/fakedata
-v $TRAVIS_BUILD_DIR:/creds
-e GOOGLE_APPLICATION_CREDENTIALS=/creds/creds.json
pushertest --dry_run --directory /var/spool --datatype fakedata