]> CyberLeo.Net >> Repos - Github/YOURLS.git/blob - .travis.yml
Update GeoIP
[Github/YOURLS.git] / .travis.yml
1 sudo: false
2
3 language: php
4 php:
5   - 5.3
6   - 5.4
7   - 5.5
8   - 5.6
9   - 7.0
10   - 7.1
11   - hhvm
12
13 matrix:
14   fast_finish: true
15   allow_failures:
16   - php: hhvm
17
18 env:
19   - DB=mysql
20
21 before_script:
22   - git clone git://github.com/YOURLS/YOURLS-unit-tests.git tests
23   - git clone git://github.com/ozh/YOURLS-fr_FR.git user/languages/fr
24   - cp user/languages/fr/fr_FR.* user/languages
25   - mysql -e 'create database IF NOT EXISTS yourls_tests;'
26   - cp tests/yourls-tests-config-travis.php user/config.php
27   - |
28     # Export Composer's global bin dir to PATH
29     composer config --list --global
30     export PATH=`composer config --list --global | grep '\[home\]' | { read a; echo "${a#* }/vendor/bin:$PATH"; }`
31   - |
32     # Install the specified version of PHPUnit depending on the PHP version:
33     case "$TRAVIS_PHP_VERSION" in
34       7.1|7.0|hhvm)
35         echo "Using PHPUnit 5.7"
36         composer global require "phpunit/phpunit=5.7.*"
37         ;;
38       5.6|5.5|5.4|5.3)
39         echo "Using PHPUnit 4.8"
40         composer global require "phpunit/phpunit=4.8.*"
41         ;;
42       *)
43         echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION"
44         exit 1
45         ;;
46     esac
47   - which phpunit  
48   - phpunit --version
49
50 script: phpunit --configuration ./tests/phpunit-travis.xml.dist
51
52 after_script: rm user/config.php
53
54 notifications:
55   email: false
56   irc:
57     channels:
58       - "irc.freenode.org#YOURLS"
59     use_notice: true