forked from skycoin/skycoin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
77 lines (65 loc) · 1.99 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
sudo: required
dist: trusty
language: go
go:
- 1.9.x
env:
global:
- ELECTRON_CACHE: $HOME/.cache/electron
- ELECTRON_BUILDER_CACHE: $HOME/.cache/electron-builder
cache:
yarn: true
directories:
- electron/node_modules
- electron/src/node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
- $HOME/.npm/_prebuilds
matrix:
include:
- os: linux
dist: trusty
- os: osx
install:
# Install gox
- go get github.com/gz-c/gox
# Install dependences for building wallet
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PULL_REQUEST" == false ]]; then sudo apt-get install --no-install-recommends -y icnsutils graphicsmagick xz-utils &&nvm install 8; fi
# for test
- go get -t ./...
- go get github.com/golang/lint/golint
- go get github.com/FiloSottile/vendorcheck
# Install gometalinter and certain linters
- go get github.com/alecthomas/gometalinter
# - go get github.com/client9/misspell/cmd/misspell
# - go get github.com/gordonklaus/ineffassign
- go get golang.org/x/tools/cmd/goimports
# - go get github.com/tsenart/deadcode
before_script:
- if [[ "$TRAVIS_OS_NAME" == "osx" && "$TRAVIS_PULL_REQUEST" == false ]]; then ./ci-scripts/add-key.sh && npm install -g yarn ;fi
script:
# - gometalinter --disable-all -E vet -E gofmt -E misspell -E ineffassign -E goimports -E deadcode --tests --vendor ./...
- gometalinter --disable-all -E goimports --tests --vendor ./...
- vendorcheck ./...
- go test ./cmd/...
- go test ./src/...
# build wallets
- if [[ "$TRAVIS_PULL_REQUEST" == false ]]; then ./ci-scripts/build-wallet.sh; fi
# after_script:
# - golint -set_exit_status ./src/...
# - golint -set_exit_status ./cmd/...
notifications:
email: false
deploy:
provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: $AWS_BUCKET
skip_cleanup: true
local_dir: electron/release
upload-dir: wallet
acl: public_read
region: $AWS_REGION
on:
repo: skycoin/skycoin
branch: master