diff options
-rw-r--r-- | .scrutinizer.yml | 22 | ||||
-rw-r--r-- | .travis.yml | 45 | ||||
-rw-r--r-- | app/config/config_test.yml | 7 | ||||
-rw-r--r-- | app/config/services.yml | 8 |
4 files changed, 70 insertions, 12 deletions
diff --git a/.scrutinizer.yml b/.scrutinizer.yml new file mode 100644 index 00000000..547120e6 --- /dev/null +++ b/.scrutinizer.yml | |||
@@ -0,0 +1,22 @@ | |||
1 | filter: | ||
2 | paths: | ||
3 | - src/* | ||
4 | excluded_paths: | ||
5 | - 'vendor/*' | ||
6 | - 'app/*' | ||
7 | - 'web/*' | ||
8 | - 'src/Wallabag/*Bundle/Tests/*' | ||
9 | - '*Test.php' | ||
10 | |||
11 | tools: | ||
12 | php_cs_fixer: true | ||
13 | php_analyzer: true | ||
14 | php_mess_detector: true | ||
15 | php_changetracking: true | ||
16 | php_code_sniffer: true | ||
17 | php_pdepend: true | ||
18 | sensiolabs_security_checker: true | ||
19 | external_code_coverage: true | ||
20 | php_code_coverage: true | ||
21 | php_sim: false | ||
22 | php_cpd: false | ||
diff --git a/.travis.yml b/.travis.yml index ff23ad45..6e938826 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -1,18 +1,45 @@ | |||
1 | language: php | 1 | language: php |
2 | 2 | ||
3 | # faster builds on docker-container setup | ||
4 | sudo: false | ||
5 | |||
6 | # cache vendor dirs | ||
7 | cache: | ||
8 | directories: | ||
9 | - vendor | ||
10 | - $HOME/.composer/cache | ||
11 | |||
3 | php: | 12 | php: |
4 | - 5.4 | 13 | - 5.4 |
5 | - 5.5 | 14 | - 5.5 |
6 | - 5.6 | 15 | - 5.6 |
16 | - hhvm | ||
17 | - nightly | ||
18 | |||
19 | matrix: | ||
20 | fast_finish: true | ||
21 | allow_failures: | ||
22 | - php: hhvm | ||
23 | - php: nightly | ||
7 | 24 | ||
8 | branches: | 25 | branches: |
9 | only: | 26 | only: |
10 | - v2 | 27 | - v2 |
11 | 28 | ||
29 | install: | ||
30 | - composer self-update | ||
31 | |||
32 | # build coverage only on one build, to speed up results feedbacks | ||
12 | before_script: | 33 | before_script: |
13 | - composer self-update | 34 | - if [[ "$TRAVIS_PHP_VERSION" = "5.6" ]]; then PHPUNIT_FLAGS="--coverage-clover=coverage.clover"; fi; |
14 | - echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini | ||
15 | 35 | ||
16 | script: | 36 | script: |
17 | - ant prepare | 37 | - ant prepare |
18 | - phpunit --coverage-text | 38 | - phpunit $PHPUNIT_FLAGS |
39 | |||
40 | after_script: | ||
41 | - | | ||
42 | if [ $TRAVIS_PHP_VERSION = '5.6' ]; then | ||
43 | wget https://scrutinizer-ci.com/ocular.phar | ||
44 | php ocular.phar code-coverage:upload --format=php-clover coverage.clover | ||
45 | fi | ||
diff --git a/app/config/config_test.yml b/app/config/config_test.yml index 00a6bc57..4dca39d2 100644 --- a/app/config/config_test.yml +++ b/app/config/config_test.yml | |||
@@ -22,3 +22,10 @@ doctrine: | |||
22 | driver: pdo_sqlite | 22 | driver: pdo_sqlite |
23 | path: %kernel.root_dir%/../data/db/wallabag_test.sqlite | 23 | path: %kernel.root_dir%/../data/db/wallabag_test.sqlite |
24 | host: localhost | 24 | host: localhost |
25 | orm: | ||
26 | metadata_cache_driver: | ||
27 | type: service | ||
28 | id: filesystem_cache | ||
29 | query_cache_driver: | ||
30 | type: service | ||
31 | 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: | |||
6 | security.validator.user_password.class: Wallabag\CoreBundle\Security\Validator\WallabagUserPasswordValidator | 6 | security.validator.user_password.class: Wallabag\CoreBundle\Security\Validator\WallabagUserPasswordValidator |
7 | 7 | ||
8 | services: | 8 | services: |
9 | # service_name: | 9 | # used for tests |
10 | # class: AppBundle\Directory\ClassName | 10 | filesystem_cache: |
11 | # arguments: ["@another_service_name", "plain_value", "%parameter_name%"] | 11 | class: Doctrine\Common\Cache\FilesystemCache |
12 | arguments: | ||
13 | - %kernel.cache_dir%/doctrine/metadata | ||