forked from datastax/php-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
44 lines (38 loc) · 1.53 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
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
env:
global:
# Configure the .phpt tests to be Travis friendly
- REPORT_EXIT_STATUS=1
- TEST_PHP_ARGS="-q -s output.txt -g XFAIL,FAIL,BORK,WARN,LEAK,SKIP -x --show-diff"
# Add the pip installation folder to the PATH, until https://github.com/travis-ci/travis-ci/issues/3563 is fixed
- PATH=$HOME/.local/bin:$PATH
before_install:
# Build the extension
# TODO: ask Travis to whitelist libuv-dev for the container-based infrastructure
- sudo apt-add-repository ppa:linuxjedi/ppa -y
- sudo apt-get update
- sudo apt-get install -y libuv-dev libssl-dev
- cd ext && ./install.sh && cd "$TRAVIS_BUILD_DIR"
- echo "extension=cassandra.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
# Install CCM
- pip install --user ccm
install:
- composer install -n
before_script:
# Use the most-up-to-date run-tests. old ones like 5.3 don't report failure exit codes
- wget -O ext/run-tests.php https://raw.githubusercontent.com/php/php-src/master/run-tests.php
# Use the BEHAT_EXTRA_OPTIONS to supply options to Behat runs
- BEHAT_EXTRA_OPTIONS=
# Use the BEHAT_SKIP_TAGS to skip tests on TravisCI
- BEHAT_SKIP_TAGS=~@skip-travisci
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.3" ]]; then BEHAT_SKIP_TAGS="${BEHAT_SKIP_TAGS}&&[email protected]"; fi
- export BEHAT_EXTRA_OPTIONS BEHAT_SKIP_TAGS
script:
- cd ext && make test && cd "$TRAVIS_BUILD_DIR" # .phpt tests
- ./bin/phpunit
- ./bin/behat --tags="${BEHAT_SKIP_TAGS}" ${BEHAT_EXTRA_OPTIONS}