This repository has been archived by the owner on Dec 27, 2018. It is now read-only.
forked from stripe/stripe-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
58 lines (47 loc) · 1.83 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
before_install:
# Install various build dependencies. We use `travis_retry` because `go get`
# will occasionally fail intermittently.
# The testify require framework is used for assertions in the test suite
- travis_retry go get -u github.com/stretchr/testify/require
# 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 the Stripe API stub so that the test suite can talk to it
- |
if [ ! -d "stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}" ]; then
mkdir -p stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}/
curl -L "https://github.com/stripe/stripe-mock/releases/download/v${STRIPE_MOCK_VERSION}/stripe-mock_${STRIPE_MOCK_VERSION}_linux_amd64.tar.gz" -o "stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}_linux_amd64.tar.gz"
tar -zxf "stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}_linux_amd64.tar.gz" -C "stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}/"
fi
- |
stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}/stripe-mock -https-port 12112 > /dev/null &
STRIPE_MOCK_PID=$!
cache:
directories:
- stripe-mock
env:
global:
# If changing this number, please also change it in `testing/testing.go`.
- STRIPE_MOCK_VERSION=0.38.0
go:
- "1.9"
- "1.10"
- "1.11"
- tip
language: go
matrix:
allow_failures:
- go: tip
fast_finish: true
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