]> CyberLeo.Net >> Repos - Github/YOURLS.git/blob - .travis.yml
Merge pull request #2452 from adigitalife/patch-1
[Github/YOURLS.git] / .travis.yml
1 language: php
2
3 env:
4   global:
5   - DB=mysql
6
7 matrix:
8   include:
9   - php: 5.3
10     dist: precise
11   - php: 5.4
12   - php: 5.5
13   - php: 5.6
14   - php: 7.0
15   - php: 7.1
16   - php: 7.2
17   - php: nightly
18   fast_finish: true
19   allow_failures:
20   - php: nightly
21   - php: 7.2
22
23 before_script:
24   - which phpunit
25   - phpunit --version
26   - mysql --version
27   - git clone git://github.com/YOURLS/YOURLS-unit-tests.git tests
28   - |
29     # Use same branch in YOURLS and YOURLS-unit-tests
30     export CURRENT_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}
31     echo "Current YOURLS branch: $CURRENT_BRANCH"
32     cd tests
33     if [ `git checkout $CURRENT_BRANCH &> /dev/null; echo $?` == 0 ]
34     then
35       echo "Using branch $CURRENT_BRANCH for Tests as well"
36     else
37       echo "Using branch master for Tests"
38     fi
39     cd ..
40   - git clone git://github.com/ozh/YOURLS-fr_FR.git user/languages/fr
41   - cp user/languages/fr/fr_FR.* user/languages
42   - mysql -e 'create database IF NOT EXISTS yourls_tests;'
43   - cp tests/yourls-tests-config-travis.php user/config.php
44
45 script: phpunit --configuration ./tests/phpunit-travis.xml.dist
46
47 notifications:
48   email: false