forked from stripe/stripe-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
68 lines (60 loc) · 1.81 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
sudo: false
dist: bionic
language: php
matrix:
include:
- php: 5.6
env: AUTOLOAD=1
dist: xenial
- php: 5.6
env: AUTOLOAD=0
dist: xenial
- php: 7.0
env: AUTOLOAD=1
dist: xenial
- php: 7.0
env: AUTOLOAD=0
dist: xenial
- php: 7.1
env: AUTOLOAD=1
- php: 7.1
env: AUTOLOAD=0
- php: 7.2
env: AUTOLOAD=1
- php: 7.2
env: AUTOLOAD=0
- php: 7.3
env: AUTOLOAD=1
- php: 7.3
env: AUTOLOAD=0
- php: 7.4
env: AUTOLOAD=1
- php: 7.4
env: AUTOLOAD=0
env:
global:
- STRIPE_MOCK_VERSION=0.101.0
cache:
directories:
- $HOME/.composer/cache/files
- stripe-mock
before_install:
# Install various build dependencies. We use `travis_retry` because Composer
# will occasionally fail intermittently.
- travis_retry make vendor
# Unpack and start stripe-mock 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 > /dev/null &
STRIPE_MOCK_PID=$!
- export PATH="${PATH}:${PWD}/stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}"
script:
- ./build.php ${AUTOLOAD}
- make fmtcheck
- if [[ `php -r "echo \version_compare(PHP_VERSION, '7.1', '>=');"` && $AUTOLOAD == 1 ]]; then make phpstan; fi
after_script: ./vendor/bin/php-coveralls -v