Skip to content

Commit

Permalink
Update travis config to comply EPV changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
rxu committed Jul 30, 2017
1 parent d2d2efc commit 0ec78c9
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions .travis.yml
@@ -1,15 +1,15 @@
# Opt into fully virtualized infrastructure
sudo: required
dist: precise

language: php

matrix:
include:
- php: 5.3.3
env: DB=mysqli
- php: 5.3
env: DB=mysqli # MyISAM
- php: 5.5
env: DB=none;NOTESTS=1
- php: 5.4
env: DB=mysqli
env: DB=mysqli #myisam
- php: 5.4
env: DB=mysql
- php: 5.4
Expand All @@ -24,10 +24,14 @@ matrix:
env: DB=mysqli
- php: 7.0
env: DB=mysqli
- php: 7.1
env: DB=mysqli
- php: nightly
env: DB=mysqli
- php: hhvm
env: DB=mysqli
allow_failures:
- php: 7.0
- php: nightly
- php: hhvm
fast_finish: true

Expand All @@ -37,32 +41,33 @@ env:
- SNIFF="1" # Should we run code sniffer on your code?
- IMAGE_ICC="1" # Should we run icc profile sniffer on your images?
- EPV="1" # Should we run EPV (Extension Pre Validator) on your code?
- PHPBB_BRANCH="3.1.x"
- PHPBB_BRANCH="3.2.x"

branches:
only:
- master
- /^(3\.[1-9]|[4-9]\.\d)\.x$/
- develop
- /^develop-.*$/
- /^\d+(\.\d+)?\.x$/

before_install:
- sudo mkdir travis
- git clone "https://github.com/nickvergessen/phpbb-ext-acme-demo.git"
- git clone "https://github.com/phpbb/phpbb-ext-acme-demo.git"
- sudo cp phpbb-ext-acme-demo/phpunit.xml.dist ./
- sudo cp phpbb-ext-acme-demo/travis/prepare-phpbb.sh travis
- sudo rm -rf phpbb-ext-acme-demo

install:
- sh -c "if [ '$EPV' != '0' ] && [ '$TRAVIS_PHP_VERSION' = '5.5' ] && [ '$DB' = 'mysqli' ]; then cd phpBB; composer require phpbb/epv:dev-master --dev --no-interaction; cd ../; fi"
- travis/prepare-phpbb.sh $EXTNAME $PHPBB_BRANCH
- cd ../../phpBB3
- travis/prepare-extension.sh $EXTNAME $PHPBB_BRANCH
- travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION
- travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
- sh -c "if [ '$EPV' = '1' -a '$NOTESTS' = '1' ]; then cd phpBB; composer remove sami/sami --update-with-dependencies --dev --no-interaction; composer require phpbb/epv:dev-master --dev --no-interaction --ignore-platform-reqs; cd ../; fi"

before_script:
- travis/setup-database.sh $DB $TRAVIS_PHP_VERSION
- travis/setup-database.sh $DB $TRAVIS_PHP_VERSION $NOTESTS

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"
- phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/travis/phpunit-$DB-travis.xml --bootstrap ./tests/bootstrap.php
- sh -c "if [ '$EPV' != '0' ] && [ '$TRAVIS_PHP_VERSION' = '5.5' ] && [ '$DB' = 'mysqli' ]; then phpBB/ext/$EXTNAME/vendor/bin/EPV.php run --dir='phpBB/ext/$EXTNAME/'; fi"
- sh -c "if [ '$SNIFF' != '0' ]; then travis/ext-sniff.sh $DB $TRAVIS_PHP_VERSION $EXTNAME $NOTESTS; fi"
- sh -c "if [ '$IMAGE_ICC' != '0' ]; then travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION $NOTESTS; fi"
- sh -c "if [ '$EPV' != '0' ] && [ '$NOTESTS' = '1' ]; then phpBB/vendor/bin/EPV.php run --dir='phpBB/ext/$EXTNAME/'; fi"
- sh -c "if [ '$NOTESTS' != '1' ]; then phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/travis/phpunit-$DB-travis.xml --bootstrap ./tests/bootstrap.php; fi"

0 comments on commit 0ec78c9

Please sign in to comment.