-
Notifications
You must be signed in to change notification settings - Fork 102
/
.travis.yml
56 lines (47 loc) · 1.78 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
language: go
matrix:
allow_failures:
- go: tip
fast_finish: true
include:
- go: 1.11.x
env: GO111MODULE=on
- go: 1.12.x
env: GO111MODULE=on
- go: 1.13.x
- go: tip
before_install:
- if [[ "${GO111MODULE}" = "on" ]]; then mkdir "${HOME}/go"; export GOPATH="${HOME}/go"; fi
- go mod download
- if [[ "${GO111MODULE}" = "on" ]]; then export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"; fi
# Install lint / code coverage / coveralls tooling
- travis_retry go get -u golang.org/x/net/http2
- travis_retry go get -u golang.org/x/tools/cmd/cover
- travis_retry go get -u github.com/modocache/gover
- travis_retry go get -u github.com/mattn/goveralls
- travis_retry go get -u golang.org/x/lint/golint
# Unpack and start test server so that the test suite can talk to it
- |
if [ ! -d "finance-mock/finance-mock_${FINANCE_MOCK_VERSION}" ]; then
mkdir -p finance-mock/finance-mock_${FINANCE_MOCK_VERSION}/
curl -L "https://github.com/piquette/finance-mock/releases/download/v${FINANCE_MOCK_VERSION}/finance-mock_${FINANCE_MOCK_VERSION}_linux_amd64.tar.gz" -o "finance-mock/finance-mock_${FINANCE_MOCK_VERSION}_linux_amd64.tar.gz"
tar -zxf "finance-mock/finance-mock_${FINANCE_MOCK_VERSION}_linux_amd64.tar.gz" -C "finance-mock/finance-mock_${FINANCE_MOCK_VERSION}/"
fi
- |
finance-mock/finance-mock_${FINANCE_MOCK_VERSION}/finance-mock > /dev/null &
FINANCE_MOCK_PID=$!
cache:
directories:
- finance-mock
env:
global:
- FINANCE_MOCK_VERSION=0.0.5
script:
- make
- make coverage
after_script:
# Merge all coverage reports located in subdirectories and put them under: gover.coverprofile
- gover
# Send code coverage report to coveralls.io
- goveralls -service=travis-ci -coverprofile=gover.coverprofile
sudo: false