forked from YOURLS/YOURLS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (43 loc) · 1.11 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
language: php
env:
global:
- DB=mysql
matrix:
include:
- php: 5.3
dist: precise
- php: 5.4
- php: 5.5
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
- php: nightly
fast_finish: true
allow_failures:
- php: nightly
- php: 7.2
before_script:
- which phpunit
- phpunit --version
- mysql --version
- git clone git://github.com/YOURLS/YOURLS-unit-tests.git tests
- |
# Use same branch in YOURLS and YOURLS-unit-tests
export CURRENT_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}
echo "Current YOURLS branch: $CURRENT_BRANCH"
cd tests
if [ `git checkout $CURRENT_BRANCH &> /dev/null; echo $?` == 0 ]
then
echo "Using branch $CURRENT_BRANCH for Tests as well"
else
echo "Using branch master for Tests"
fi
cd ..
- git clone git://github.com/ozh/YOURLS-fr_FR.git user/languages/fr
- cp user/languages/fr/fr_FR.* user/languages
- mysql -e 'create database IF NOT EXISTS yourls_tests;'
- cp tests/yourls-tests-config-travis.php user/config.php
script: phpunit --configuration ./tests/phpunit-travis.xml.dist
notifications:
email: false