This repository has been archived by the owner on Jan 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy path.travis.yml
61 lines (49 loc) · 2.05 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
language: php
sudo: false
cache:
directories:
- $HOME/.composer/cache/files
php: [5.4, 5.6, 7.0, 7.1]
env:
global:
- NODE_VERSION='6.17.0' # node version needed for zombie 3.0
- ZOMBIE_VERSION='@^3.0' # npm will install Zombie 4.x by default, even though it is not compatible with the version of node available on Travis.
# Force using PHP 5.6 for the webserver to be able to run it on PHP 5.3 and HHVM jobs too
- MINK_PHP_BIN=~/.phpenv/versions/5.6/bin/php
# Force binding to IPv4 as Zombie and PHP seem to have a different resolution for localhost on Travis.
- MINK_HOST=127.0.0.1:8002
matrix:
include:
- php: 5.3
dist: precise
env: NODE_VERSION='0.10.36'
- php: 5.5
env: PHPUNIT_VERSION='^5.4'
- php: 5.6
env: ZOMBIE_VERSION='@^2.0'
- php: 5.6
env:
- NODE_VERSION='5.4.1'
- ZOMBIE_VERSION='@^4.0'
- php: 7.2
env: PHPUNIT_VERSION='^6.0'
- php: 7.3
env: PHPUNIT_VERSION='^6.0'
before_install:
- wget https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz && tar xfz node-v${NODE_VERSION}-linux-x64.tar.gz && export PATH="`pwd`/node-v${NODE_VERSION}-linux-x64/bin:$PATH"
- if [[ "${PHPUNIT_VERSION}" != "" ]]; then composer require phpunit/phpunit:${PHPUNIT_VERSION}; fi
- node --version
- npm --version
install:
- composer install
- npm install zombie$ZOMBIE_VERSION
before_script:
# Start a webserver for web fixtures.
- vendor/bin/mink-test-server > /dev/null 2>&1 &
# Set the PHPUnit executable to the local or global one
- if [[ "${PHPUNIT_VERSION}" != "" ]]; then PHPUNIT_CMD=vendor/bin/phpunit; else PHPUNIT_CMD=phpunit; fi
script:
- ${PHPUNIT_CMD} -v --coverage-clover=coverage.clover
after_script:
# XDebug is not yet available on PHP 7.1 so we don't have code coverage there. Not uploading it avoids telling Scrutinizer that it is missing
- if [[ "$TRAVIS_PHP_VERSION" != "7.1" ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi