From a05be8abecfe9e5dc032a93ba1a0b6063f3f7c9b Mon Sep 17 00:00:00 2001 From: Jeremy Date: Fri, 27 Mar 2015 19:46:36 +0100 Subject: Use doctrine cache for tests --- app/config/config_test.yml | 7 +++++++ app/config/services.yml | 8 +++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/config/config_test.yml b/app/config/config_test.yml index a6ead1e8..32156963 100644 --- a/app/config/config_test.yml +++ b/app/config/config_test.yml @@ -20,3 +20,10 @@ doctrine: driver: pdo_sqlite path: %kernel.root_dir%/../data/db/wallabag_test.sqlite host: localhost + orm: + metadata_cache_driver: + type: service + id: filesystem_cache + query_cache_driver: + type: service + id: filesystem_cache diff --git a/app/config/services.yml b/app/config/services.yml index 91a03e10..af22d381 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -6,6 +6,8 @@ parameters: security.validator.user_password.class: Wallabag\CoreBundle\Security\Validator\WallabagUserPasswordValidator services: -# service_name: -# class: AppBundle\Directory\ClassName -# arguments: ["@another_service_name", "plain_value", "%parameter_name%"] + # used for tests + filesystem_cache: + class: Doctrine\Common\Cache\FilesystemCache + arguments: + - %kernel.cache_dir%/doctrine/metadata -- cgit v1.2.3 From 2d733277e614bd4569530e63c676722c2b9df15f Mon Sep 17 00:00:00 2001 From: Jeremy Date: Fri, 27 Mar 2015 19:47:30 +0100 Subject: Switch to Docker-based infrastructure --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ff23ad45..a697e74b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,8 @@ language: php +# use docker-container infra +sudo: false + php: - 5.4 - 5.5 @@ -11,7 +14,6 @@ branches: before_script: - composer self-update - - echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini script: - ant prepare -- cgit v1.2.3 From 6141388969aaf5d2ad1c4d3bdd6d688ea1decf9f Mon Sep 17 00:00:00 2001 From: Jeremy Date: Fri, 27 Mar 2015 19:58:48 +0100 Subject: Enable hhvm & nightly for curiosity --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index a697e74b..d9344827 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,13 @@ php: - 5.4 - 5.5 - 5.6 + - hhvm + - nightly + +matrix: + allow_failures: + - php: hhvm + - php: nightly branches: only: -- cgit v1.2.3 From 3e6b7ea0e9251d8ae69af5dc2e1eb65887c3da9f Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sat, 28 Mar 2015 00:23:25 +0100 Subject: Rewrite travis & add scrutinizer --- .scrutinizer.yml | 22 ++++++++++++++++++++++ .travis.yml | 46 ++++++++++++++++++++++++++++++++-------------- 2 files changed, 54 insertions(+), 14 deletions(-) create mode 100644 .scrutinizer.yml diff --git a/.scrutinizer.yml b/.scrutinizer.yml new file mode 100644 index 00000000..547120e6 --- /dev/null +++ b/.scrutinizer.yml @@ -0,0 +1,22 @@ +filter: + paths: + - src/* + excluded_paths: + - 'vendor/*' + - 'app/*' + - 'web/*' + - 'src/Wallabag/*Bundle/Tests/*' + - '*Test.php' + +tools: + php_cs_fixer: true + php_analyzer: true + php_mess_detector: true + php_changetracking: true + php_code_sniffer: true + php_pdepend: true + sensiolabs_security_checker: true + external_code_coverage: true + php_code_coverage: true + php_sim: false + php_cpd: false diff --git a/.travis.yml b/.travis.yml index d9344827..6e938826 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,27 +1,45 @@ language: php -# use docker-container infra +# faster builds on docker-container setup sudo: false +# cache vendor dirs +cache: + directories: + - vendor + - $HOME/.composer/cache + php: - - 5.4 - - 5.5 - - 5.6 - - hhvm - - nightly + - 5.4 + - 5.5 + - 5.6 + - hhvm + - nightly matrix: - allow_failures: - - php: hhvm - - php: nightly + fast_finish: true + allow_failures: + - php: hhvm + - php: nightly branches: - only: - - v2 + only: + - v2 + +install: + - composer self-update +# build coverage only on one build, to speed up results feedbacks before_script: - - composer self-update + - if [[ "$TRAVIS_PHP_VERSION" = "5.6" ]]; then PHPUNIT_FLAGS="--coverage-clover=coverage.clover"; fi; script: - - ant prepare - - phpunit --coverage-text + - ant prepare + - phpunit $PHPUNIT_FLAGS + +after_script: + - | + if [ $TRAVIS_PHP_VERSION = '5.6' ]; then + wget https://scrutinizer-ci.com/ocular.phar + php ocular.phar code-coverage:upload --format=php-clover coverage.clover + fi -- cgit v1.2.3