forked from paragonie/sodium_compat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
84 lines (81 loc) · 2.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
language: php
matrix:
fast_finish: true
include:
- php: "5.2"
dist: precise
env: USE_PSALM=0
CHECK_MBSTRING=1
- php: "5.3"
dist: precise
env: USE_PSALM=0
CHECK_MBSTRING=1
- php: "5.4"
dist: trusty
env: USE_PSALM=0
CHECK_MBSTRING=1
- php: "5.5"
dist: trusty
env: USE_PSALM=0
CHECK_MBSTRING=1
- php: "5.6"
dist: xenial
env: USE_PSALM=1
CHECK_MBSTRING=1
- php: "7.0"
dist: xenial
env: USE_PSALM=1
CHECK_MBSTRING=1
- php: "7.1"
dist: bionic
env: USE_PSALM=1
CHECK_MBSTRING=1
- php: "7.2"
dist: bionic
env: USE_PSALM=1
CHECK_MBSTRING=0
- php: "7.3"
dist: bionic
env: USE_PSALM=1
CHECK_MBSTRING=0
- php: "7.4"
dist: bionic
env: USE_PSALM=1
CHECK_MBSTRING=0
- php: "nightly"
dist: bionic
env: USE_PSALM=0
CHECK_MBSTRING=0
- php: "master"
dist: bionic
env: USE_PSALM=0
CHECK_MBSTRING=0
- php: "hhvm-3.24"
dist: trusty
env: USE_PSALM=0
CHECK_MBSTRING=1
allow_failures:
- php: "nightly"
- php: "master"
- php: "hhvm-3.24"
install:
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.4" ]] && [[ $USE_PSALM -eq 1 ]]; then composer require --dev "phpunit/phpunit:^7"; fi
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.2" ]]; then `phpenv global 5.3.29`; fi
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.2" ]]; then cat composer-php52.json > composer.json; fi
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.4" ]] && [[ $USE_PSALM -eq 1 ]]; then composer require --dev "vimeo/psalm:^3.6"; fi
- if [[ ${TRAVIS_PHP_VERSION:0:3} != "7.4" ]] && [[ $USE_PSALM -eq 1 ]]; then composer require --dev "vimeo/psalm:^1|^2"; fi
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.4" ]]; then `cp psalm-above-3.xml psalm.xml`; else `cp psalm-below-3.xml psalm.xml`; fi
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.2" ]]; then chmod +x tests/fix-php52.sh; fi
- gitcommit=$(git rev-parse HEAD) && composer config autoloader-suffix "$gitcommit"
- composer update
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.2" ]]; then tests/fix-php52.sh; fi
- if [[ ${TRAVIS_PHP_VERSION:0:3} == 7.3 ]]; then composer require --dev "phpstan/phpstan:^0.11.5"; fi
- chmod +x tests/polyfill_test.sh
- chmod +x tests/travis-php52.sh
- chmod +x tests/travis.sh
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.2" ]]; then `phpenv global "$TRAVIS_PHP_VERSION"`; fi
script:
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.3" ]]; then vendor/bin/phpstan analyze; fi
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.2" ]]; then travis_wait 60 tests/travis-php52.sh; else travis_wait 30 tests/travis.sh; fi
- if [[ $USE_PSALM -eq 1 ]]; then vendor/bin/psalm; fi
- tests/polyfill_test.sh