forked from aws/aws-sdk-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
79 lines (65 loc) · 1.95 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
74
75
76
77
78
79
dist: trusty
language: php
php:
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
- hhvm-3.24
- nightly
env:
- COMPOSER_OPTS=""
- COMPOSER_OPTS="--prefer-lowest"
matrix:
allow_failures:
- php: hhvm-3.24
- php: nightly
fast_finish: true
sudo: false
before_install:
- echo "memory_limit=4G" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;
install:
# Setup environment variables for testing
- export AWS_ACCESS_KEY_ID=foo
- export AWS_SECRET_ACCESS_KEY=bar
- export AWS_CSM_ENABLED=false
# Build job specific tweaks
- >
if [ $(phpenv version-name) == "5.5" ]; then
rm ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
fi
- >
if [ $(phpenv version-name) != "hhvm-3.24" ] && [ $(phpenv version-name) != "nightly" ]; then
echo "xdebug.overload_var_dump = 0" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
fi
- >
if { [ $(phpenv version-name) == "7.2" ] || [ $(phpenv version-name) == "7.3" ] || [$(phpenv version-name) == "7.4"]; } && [ -v COMPOSER_OPTS ]; then
composer require --dev phpunit/phpunit "^5.7.11"
fi
# Resolve dependencies
- composer --version
- travis_retry composer update $COMPOSER_OPTS --no-interaction --prefer-source
- composer show guzzlehttp/guzzle
script:
# Unit tests
- travis_wait 60 make test
# Static analysis
- >
test_versions=("7.1" "7.2" "7.3" "7.4");
if [[ " ${test_versions[@]} " =~ " $(phpenv version-name) " ]] && [ -z $COMPOSER_OPTS ]; then
composer require --dev nette/neon "^3.0"
composer require --dev phpstan/phpstan "^0.12.11"
vendor/bin/phpstan analyse src
fi
# Package generation
- if [ -z "$COMPOSER_OPTS" ]; then make package; fi
after_success:
# Code coverage report
- >
if [ $(phpenv version-name) == "7.1" ]; then
bash <(curl -s https://codecov.io/bash)
fi