-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
55 lines (48 loc) · 2.36 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
51
52
53
54
55
language: php
php:
- "5.5"
- "5.6"
- "hhvm"
- "hhvm-nightly"
install:
- sudo apt-get update
# install apache2 w/ FastCGI
# - bash .travisci/configure_apache2.sh
# install application dependencies
- composer install --dev
# Doctrine DBAL stable release is not compatible with HHVM
- if [[ "$TRAVIS_PHP_VERSION" = "hhvm" || "$TRAVIS_PHP_VERSION" = "hhvm-nightly" ]]; then composer require --dev doctrine/dbal:~2.5; fi
- composer show -i
# Install Scrutinizer-CI utility
- wget https://scrutinizer-ci.com/ocular.phar
before_script:
# - mysql -e 'create database usarugby'
# - cp .travisci/doctrine.local.php.dist config/autoload/doctrine.local.php
# - ./bin/doctrine-module orm:schema-tool:create
# - ./bin/doctrine-module data-fixture:import
# - ./bin/console data-importer run-fixtures --group=testing
# - sudo sh -e .travisci/start_selenium2.sh
script:
# Coding Standards checks
- for DIR in module config; do bin/php-cs-fixer fix -v --dry-run --fixers=-psr0,psr4 $DIR; done;
# Run the unit tests
- find module -type f -name "phpunit.xml" | sort | while read FILE; do ./bin/phpunit -c $FILE; done;
# Set up database for Behat tests
# - ./bin/doctrine-module orm:schema-tool:drop --force
# - ./bin/doctrine-module orm:schema-tool:create
# - ./bin/doctrine-module data-fixture:import
# - ./bin/console data-importer run-fixtures --group=testing
# The version of Behat we use doesn't support PHP 5.6 (@see https://github.com/Behat/Behat/issues/525)
# - if [[ "$TRAVIS_PHP_VERSION" != "5.6" ]]; then find module -type f -name "behat.yml.dist" | sort | while read FILE; do REALFILE=${FILE/.dist/}; if [ ! -f "$REALFILE" ]; then cp "$FILE" "$REALFILE"; fi; ./bin/behat --config $REALFILE; done; fi;
after_script:
# Upload code coverage to Scrutinizer-CI
- find module -type f -name "clover.xml" | sort | while read FILE; do php ocular.phar code-coverage:upload --format=php-clover $FILE; done;
# Print some diagnostic stuff
# - cat /tmp/apache2_default_error.log
# - find /tmp -name "failure_*.html" | while read FILE; do echo $FILE; echo "======================" ; cat $FILE; echo -e "\n\n\n\n"; done;
matrix:
fast_finish: true
env:
global:
# IMGUR_CLIENT_ID
secure: M2tUDMQkq4VlXKOCui3lypLEFth6a/RrXyt+gEdM8w2AyEggBUtTr5zr41xCEBVznovbQ8L1q+gvhxjLGo36Q6HqP1xsuNkd0+VgiqmfhUQ0m5NDilos7U9QVxHfqaEiPD3CvgOhB9f06kFm9oybKzXuduQB9t+PkuMUhoRw6HM=