forked from moov-io/fed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
73 lines (73 loc) · 3.25 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
language: go
dist: xenial
sudo: false
services:
- docker
env:
matrix:
- GO111MODULE=on
matrix:
include:
- os: linux
go: 1.13.x
cache:
directories:
- "/home/travis/.cache/go-build"
- os: osx
go: 1.13.x
cache:
directories:
- "/Users/travis/Library/Caches/go-build"
before_install:
# Setup directory for binaries
- mkdir ./bin
- export PATH=$PATH:$PWD/bin
# Misspell
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget -O misspell.tar.gz https://github.com/client9/misspell/releases/download/v0.3.4/misspell_0.3.4_linux_64bit.tar.gz; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then wget -O misspell.tar.gz https://github.com/client9/misspell/releases/download/v0.3.4/misspell_0.3.4_mac_64bit.tar.gz; fi
- tar xf misspell.tar.gz && cp ./misspell ./bin/misspell
# staticcheck
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget -O staticcheck.tar.gz https://github.com/dominikh/go-tools/releases/download/2019.2.3/staticcheck_linux_amd64.tar.gz; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then wget -O staticcheck.tar.gz https://github.com/dominikh/go-tools/releases/download/2019.2.3/staticcheck_darwin_amd64.tar.gz; fi
- tar xf staticcheck.tar.gz && cp ./staticcheck/staticcheck ./bin/staticcheck
# golint
- go get -u golang.org/x/lint/golint
# gocyclo
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget -O ./bin/gocyclo https://github.com/adamdecaf/gocyclo/releases/download/2019-08-09/gocyclo-linux-amd64; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then wget -O ./bin/gocyclo https://github.com/adamdecaf/gocyclo/releases/download/2019-08-09/gocyclo-darwin-amd64; fi
- chmod +x ./bin/gocyclo
before_script:
- GOFILES=$(find . -type f -name '*.go' | grep -v vendor | grep -v client)
- go mod graph
script:
# Just check gofmt on linux, it's the fastest builder
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then test -z $(gofmt -s -l $GOFILES); fi
- go test ./... -race -coverprofile=coverage.txt -covermode=atomic
- misspell -error -locale US $GOFILES
- gocyclo -over 25 $GOFILES
- golint -set_exit_status $GOFILES
- staticcheck *.go
- staticcheck ./cmd/server/*.go
- staticcheck ./pkg/strcmp/*.go
after_success:
- bash <(curl -s https://codecov.io/bash) -X fix
- make
- make client
- make docker
before_deploy:
- make dist
deploy:
provider: releases
api_key:
secure: lYQO2KgkUTGvyDm6FOU2/Ny6R06BsTMsArwkHGiM2Uc7FxvtHQm8Ko8vtflIA9f4EW/WBgbIfxTRI9w++UoGP6YmyXXln5jM07qGbf49uOq2i00iIdc2xp13MC2TQfCtqKhPUQXlAZASViYI+E7uVibxY5hZZtrs8gGbaGYO+5Tlf3qeKUVQRf61ylbGc5/CmYIjLtUOUcRNPfrhLRIXF/EReE0IV80EJb/gd/HWiszYiv2hdwfWclXAkZk8vYjG3znnGjhRjEdDjJX65Kmr7YYZnngp4qQCumyFArH3yGW3xpR8hs8ra5lWJtMNW/UdFqiq/RM6YNPuO81LCxgwPoIjS2VKqlIOUHAV+hCyrSTUjZY916VUlSuMYhwFvRddkIbS3D6oSdiWZq3XMUQjr0PjK6VOgSjMAoyd9lWlNC/NlPi9o+JtM3tHqJb4v7DJkQIz6ffBdKLmXdv/0dXpTkafFArrQyweuwluvdbwShyIlSM9B360j6p0azLYDULsC39g8RlnQMOB/lZ7xSpVqd8mT9NRfp1O8tjwtu+DqvLskjhRUpYrKF7/58g8yKZGt/yrgBhBmghXGq9rq5ce4fCVUGc5oOvswmDHHrHwNJJIp6mGlkdJUgpXaw3YDfajIma2H8Vrugx7fA1SPSWXH7lok3pe/9a3rPb/Q1Ov6Fo=
file_glob: true
file:
- bin/fed-*
on:
repo: moov-io/fed
tags: true
go: 1.13.x
skip_cleanup: true
after_deploy:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- make release-push