Skip to content

Produce code coverage only once #215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 5, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm

branches:
Expand Down Expand Up @@ -32,6 +32,10 @@ matrix:
env:
- SYMFONY_VERSION='2.7.*@dev'
- FRAMEWORK_EXTRA_VERSION='~3.0'
- php: 5.6
env:
- PHPUNIT_FLAGS="--coverage-clover=coverage.clover"
- COVERAGE=true

# only needed for the hackaround for https://github.com/symfony/symfony/issues/12868
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaik there is now an official method for this: http://symfony.com/blog/new-in-symfony-2-7-phpunit-bridge

do you want to try that as well? so we could clean up some of the tricks we did to avoid problems with the deprecation notices.

@wouterj i thought we are using this in the cmf now, but can't find the right place to point out. can you help us find the example?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbu just require symfony/phpunit-bridge and your ready. Then, fix all deprecations. After this, you're probably left with a few deprecations because:

  1. Legacy classes are used to remain BC
  2. Things can't be fixed nicely (the usage of factory-service in services.xml for instance)

For (1), you have to annotate your tests/testcases with @group legacy and for (2), you use the env variable SYMFONY_DEPRECATION_HELPER=weak.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks a lot wouter! will try this in a separate PR then.

before_install:
Expand All @@ -47,13 +51,13 @@ before_script:
- sudo pip install -r Resources/doc/requirements.txt

script:
- phpunit --coverage-clover=coverage.clover
- phpunit ${PHPUNIT_FLAGS}
- make -C Resources/doc SPHINXOPTS='-nW' html
- make -C Resources/doc spelling

after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
- if [[ "$COVERAGE" = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [[ "$COVERAGE" = true ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi

after_failure:
- cat /tmp/fos-http-cache-bundle/logs/test.log