forked from keybase/client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (51 loc) · 2.03 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
sudo: required
dist: trusty
os:
- linux
language: go
go:
- 1.6
services:
- docker
before_install:
- echo "Running on commit `git rev-parse HEAD`."
- export DEBIAN_FRONTEND=noninteractive
- sudo apt-get update;
- sudo apt-get install -q -y --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" docker-engine graphicsmagick s3cmd;
- echo -e '[default]\naccess_key = $AWS_ACCESS_KEY_ID\nsecret_key = $AWS_SECRET_ACCESS_KEY' > ~/.s3cfg;
install: true
before_script:
- sh -e /etc/init.d/xvfb start
- export DISPLAY=:99.0
script:
- export BASE=$PWD
- cd $BASE/desktop && ../packaging/npm_mess.sh &&
cd $BASE/shared && npm i -g flow-bin@`tail -n1 .flowconfig` && flow &&
cd $BASE && desktop/node_modules/.bin/eslint . &&
if [ $TRAVIS_PULL_REQUEST != 'false' ]; then
cd $BASE/desktop && npm install octonode && VISDIFF_PR_ID=$TRAVIS_PULL_REQUEST npm run visdiff -- "`git rev-parse HEAD^1`...`git rev-parse HEAD`";
fi &&
cd $BASE/protocol && ./diff_test.sh &&
docker login -e "$CI_EMAIL" -u "$DOCKER_USER" -p "$DOCKER_PASS" &&
docker pull $DOCKER_USER/kbweb &&
travis_retry docker run --name kbweb3000 -d -p 3000:3000 -p 9911:9911 --entrypoint run/startup_for_container.sh $DOCKER_USER/kbweb &&
cd $BASE/go && ./test/check_or_start_kbweb.sh && ./test/run_tests.sh;
after_success:
- if [ $TRAVIS_PULL_REQUEST == 'false' ]; then
go install github.com/keybase/client/go/keybase &&
cp $GOPATH/bin/keybase $GOPATH/src/github.com/keybase/client/go/keybase/keybase &&
docker build -t kbclient . &&
docker tag kbclient $DOCKER_USER/kbclient &&
docker push $DOCKER_USER/kbclient;
else
echo "Not pushing to Docker, because this isn't a push to master.";
fi
after_failure:
- docker logs kbweb3000;
notifications:
slack:
rooms:
secure: W5hUm0MPWJ3v2VGRAq9fxgroVvqFOkwnbrxllEX3Zadf3e909fwQzm7KEUvSEd9fhsKrdBxPrphCZd1UCq5cXjCkfokKFojnbgnYPKZYgL4M7GWqiURCfIUY7r0gQCDnFzIIANacIbhT8089IkQva8QWCdfX4zVycTKOvMC0msE=
branches:
only:
- master