-
Notifications
You must be signed in to change notification settings - Fork 19
/
.travis.yml
50 lines (44 loc) · 2.14 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
language: php
sudo: required
matrix:
include:
- php: 5.3
env: DB=mysqli
- php: 5.4
env: DB=mysqli
- php: 5.4
env: DB=mysql
- php: 5.4
env: DB=mariadb
- php: 5.4
env: DB=postgres
- php: 5.4
env: DB=sqlite3
- php: 5.5
env: DB=mysqli
- php: 5.6
env: DB=mysqli
fast_finish: true
env:
global:
- EXTNAME="tierra/topicsolved"
- SNIFF="1" # Run code sniffer
- IMAGE_ICC="1" # Run ICC profile sniffer on images
- EPV="1" # Run EPV (Extension Pre Validator)
- PHPBB_BRANCH="3.1.x"
install:
- travis_retry composer install --dev --no-interaction --prefer-source
- travis/prepare-phpbb.sh $EXTNAME $PHPBB_BRANCH
- cd ../../phpBB3
- travis/prepare-extension.sh $EXTNAME $PHPBB_BRANCH
- travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION
before_script:
- travis/setup-database.sh $DB $TRAVIS_PHP_VERSION
script:
- sh -c "if [ '$SNIFF' != '0' ]; then travis/ext-sniff.sh $DB $TRAVIS_PHP_VERSION $EXTNAME; fi"
- sh -c "if [ '$IMAGE_ICC' != '0' ]; then travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION; fi"
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.4' ] && [ '$DB' = 'mysqli' ]; then phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/phpunit.xml.dist && php phpBB/ext/$EXTNAME/travis/check-coverage.php; else phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/travis/phpunit-$DB-travis.xml --bootstrap ./tests/bootstrap.php; fi"
- sh -c "if [ '$EPV' != '0' ] && [ '$TRAVIS_PHP_VERSION' = '5.3' ] && [ '$DB' = 'mysqli' ]; then phpBB/ext/$EXTNAME/vendor/bin/EPV.php run --dir='phpBB/ext/$EXTNAME/'; fi"
after_script:
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.4' ] && [ '$DB' = 'mysqli' ] && [ '$TRAVIS_BRANCH' = 'master' ] && [ '$TRAVIS_PULL_REQUEST' = 'false' ]; then cd phpBB/ext/$EXTNAME && vendor/bin/test-reporter --coverage-report clover.xml; fi"
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.4' ] && [ '$DB' = 'mysqli' ]; then cd phpBB/ext/$EXTNAME && wget -nv https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --repository=g/tierra/topicsolved --revision=$TRAVIS_COMMIT --format=php-clover clover.xml; fi"