forked from getamis/eth-indexer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (46 loc) · 1.55 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
language: go
go:
- "1.11"
services:
- docker
addons:
apt:
packages:
- docker-ce
before_script:
- sudo service mysql stop
jobs:
include:
- stage: Lint
script:
- go get -u gopkg.in/alecthomas/gometalinter.v2
- gometalinter.v2 --install
- gometalinter.v2 --exclude="(vendor/.*|.*/mocks/.*)" --disable-all --deadline=10m --enable=vet --enable=gofmt --enable=misspell --enable=goconst --enable=unconvert --enable=gosimple --min-occurrences=6 ./...
if: branch IN (master) AND type IN (pull_request)
- stage: Build
script: make clean all
if: branch IN (master) AND type IN (pull_request)
- stage: Unit test
script:
- docker pull mysql:5.7
- make test
after_success:
- bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN
if: branch IN (master) AND type IN (pull_request)
- stage: Develop Release
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin quay.io/amis
- make eth-indexer-docker
- make eth-indexer-docker.push
- make migration-docker
- make migration-docker.push
if: branch = master AND (NOT type IN (pull_request))
- stage: Staging Release
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin quay.io/amis
- make eth-indexer-docker
- make eth-indexer-docker.push
- make migration-docker
- make migration-docker.push
if: tag =~ ^v
env: DOCKER_IMAGE_TAG="$TRAVIS_TAG"