forked from sculpin/sculpin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
101 lines (94 loc) · 2.8 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
cache:
directories:
- $HOME/.composer/cache
addons:
homebrew:
packages:
- php
- composer
matrix:
allow_failures:
- os: windows
language: node_js
include:
- os: linux
dist: trusty
language: php
php: 7.3
env:
- DEPS=latest
- os: linux
dist: trusty
language: php
php: 7.3
env:
- DEPS=lowest
- os: linux
dist: trusty
language: php
php: 7.3
env:
- DEPS=locked
- CHECK_CS=true
- TEST_COVERAGE=true
- CHECK_PHPSTAN=true
- os: linux
dist: trusty
language: php
php: 7.4
env:
- DEPS=latest
- os: linux
dist: xenial
language: php
php: 8.0
env:
- DEPS=latest
- os: windows
env:
- DEPS=locked
- CHECK_CS=false
- TEST_COVERAGE=false
- CHECK_PHPSTAN=false
language: node_js
node_js: 10
before_install:
- choco install php composer
- export PATH=/c/tools/php74:/c/ProgramData/ComposerSetup/bin:$PATH
- PHP_EXTENSIONS="curl bz2 gd2"
- for php_ext in $PHP_EXTENSIONS ; do sed -i -e "s/^;extension=${php_ext}/extension=${php_ext}/" /c/tools/php74/php.ini ; done
- sed -i -e 's/^memory_limit = .*/memory_limit = -1/' /c/tools/php74/php.ini
- find . -type f -name "*.php" -print0 | xargs -0 sed -i ':a;N;$!ba;s/\r//g'
- os: osx
language: node_js
env:
- DEPS=locked
- CHECK_CS=false
- TEST_COVERAGE=false
- CHECK_PHPSTAN=false
node_js: 10
addons:
homebrew:
packages:
- php
- composer
update: true
before_install:
- travis_retry composer self-update
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then phpenv config-rm xdebug.ini || true; fi
install:
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update --no-interaction ; fi
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable --no-interaction ; fi
- if [[ $DEPS == 'locked' ]]; then travis_retry composer install --no-interaction --ignore-platform-reqs ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" || "$TRAVIS_OS_NAME" == "osx" ]]; then stty cols 120; fi
- COLUMNS=120 composer show
script:
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; fi
- if [[ $TEST_COVERAGE != 'true' ]]; then composer test ; fi
- if [[ $CHECK_CS == 'true' ]]; then composer cs-check ; fi
- if [[ $CHECK_PHPSTAN == 'true' ]]; then composer phpstan || true ; fi
after_script:
- if [[ $TEST_COVERAGE = 'true' ]]; then travis_retry wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover clover.xml ; fi
notifications:
irc: "irc.freenode.org#sculpin"
email: false