forked from SkygearIO/skygear-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
90 lines (77 loc) · 3.75 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
language: go
go:
- 1.9.4
- 1.10.2
addons:
postgresql: "9.5"
services:
- redis-server
- docker
cache:
directories:
- $HOME/.cache
go_import_path: github.com/skygeario/skygear-server
before_install:
- mkdir -p $HOME/.cache/local
- export LD_INSTALL_PREFIX=$HOME/.cache/local
- export LD_LIBRARY_PATH=$LD_INSTALL_PREFIX/lib:$LD_LIBRARY_PATH
- export LIBRARY_PATH=$LD_INSTALL_PREFIX/lib:$LIBRARY_PATH
- export PKG_CONFIG_PATH=$LD_INSTALL_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
- mkdir -p $LD_INSTALL_PREFIX/src
- pushd $LD_INSTALL_PREFIX/src
- $TRAVIS_BUILD_DIR/scripts/build-git-lib.sh git://github.com/jedisct1/libsodium.git 1.0.8
- $TRAVIS_BUILD_DIR/scripts/build-git-lib.sh git://github.com/zeromq/zeromq4-1.git v4.1.4
- popd
- sudo curl -fsSL -o /usr/local/bin/dep https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64
- sudo curl -fsSL -o /usr/local/bin/vg https://github.com/GetStream/vg/releases/download/v0.8.0/vg-linux-amd64
- curl -fsSL https://github.com/alecthomas/gometalinter/releases/download/v2.0.4/gometalinter-2.0.4-linux-amd64.tar.gz | sudo tar --strip-components 1 -C /usr/local/bin -zx
- sudo chmod +x /usr/local/bin/dep /usr/local/bin/vg
- 'eval "$(vg eval --shell bash)"'
- vg init
install:
- sudo apt-get install -y postgresql-9.5-postgis-2.3
- vg ensure
before_script:
- psql -c 'CREATE DATABASE skygear_test;' -U postgres
- psql -c 'CREATE EXTENSION postgis;' -U postgres -d skygear_test
script:
- WITH_ZMQ=1 make generate
- git status | grep "_string.go$"; test $? -eq 1
- git status | grep "mock.go$"; test $? -eq 1
- WITH_ZMQ=1 make lint
- WITH_ZMQ=1 make test
before_deploy:
- if [[ ! -z "$TRAVIS_TAG" ]]; then make all archive; fi
deploy:
- provider: releases
api-key: "$GITHUB_RELEASE_TOKEN"
file:
- "dist/skygear-server-*.tar.gz"
- "dist/skygear-server-*.zip"
skip_cleanup: true
file_glob: true
on:
repo: SkygearIO/skygear-server
tags: true
go: 1.9.4
- provider: script
script: ./scripts/deploy-docker-hub.sh
skip_cleanup: true
on:
repo: SkygearIO/skygear-server
all_branches: true
go: 1.9.4
- provider: script
script: ./scripts/deploy-quay-io.sh
skip_cleanup: true
on:
repo: SkygearIO/skygear-server
all_branches: true
go: 1.9.4
notifications:
slack:
secure: "dza31bqJ4z51o2x4A0fowKxR6Brop/whekwIZ+JLfjBxZrIyYN0QxnHdi2kcEJwWFPtZdoenCRCLsCATB6/fkHieYkNrEpRjGkzVfOmtH7nYgC+870JH9gHGoWPkL1iTJ69Cl7cqBRXcR5Pr+wfl+RK+GdZnfKjyZTcr/dj1IS41sSCgGONhFmqMiwiJAlbvPIxOE4bbxJmnwHj71drWihLk7rweP0bqmq92/4fK0u/3to1Ng4X71ImSSqdbj+jyX9mNiMhkkPWdBupUOyMARcKo0B5jUwVy7GwlG68b8BoOkFwi4zNaQ44metHXt8EkMWGvaXYvSlnkzqDiT5ZlWBt5ZIruB4RmpGcMxTEAgM0LbJ5bm8Rp8D7K3NNTPNp6S/QS5bmpFIoRv8qXhbWaJ4qzmAOMQIIOzBRDXKWfaUNd5XHlvcIyyD7zLWJJRO4Sy+S5IjzBBRPJNW5XAB3MNt9FZt2DL/NK0u6uUEQsfoezuYq5BcWJ+1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