Skip to:
Content

BuddyPress.org

Changeset 10997 for trunk/.travis.yml


Ignore:
Timestamp:
08/07/2016 01:47:28 PM (3 years ago)
Author:
djpaul
Message:

Travis-CI: adds code coverage with https://codecov.io

Adds a new Travis-CI task which runs PHPUnit with code coverage enabled.
The results are piped to codecov.io, which we're experimenting with to track
progress on our code's test coverage as the project grows.

Code coverage generation is very slow. To try to minimise the impact on the
rest of our Travis-CI configuration, the new travis:codecoverage task is
set in the allowed_failures section, which means Travis-CI should report
test pass/fail without waiting for the code coverage generation.

Another effort to speed this up has Travis-CI running the code coverage task
on PHP7 with phpdbg, as opposed to relying on xdebug, which is the default.

See #7207 and https://codecov.io/gh/buddypress/BuddyPress

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.travis.yml

    r10986 r10997  
    3636    - php: 7.0
    3737      env: WP_VERSION=master BP_TRAVISCI=travis:grunt
     38    - php: 7.0
     39      env: WP_VERSION=master BP_TRAVISCI=travis:codecoverage
    3840    - php: hhvm
    3941      sudo: required
     
    5254    - php: nightly
    5355    - php: hhvm
     56    - env: BP_TRAVISCI=travis:codecoverage WP_VERSION=master
    5457
    5558# before_install: Failures in this section will result in build status 'errored'
     
    6366  - cd ..
    6467  - mv $plugin_slug $plugin_dir
     68  # Disable xdebug if running codecoverage (use phpdbg instead).
     69  - if [[ "$BP_TRAVISCI" == "travis:codecoverage" ]] ; then phpenv config-rm xdebug.ini; fi
    6570  # set up tests config
    6671  - cd $WP_DEVELOP_DIR
     
    9196script: grunt $BP_TRAVISCI
    9297
     98+after_script:
     99- |
     100  if [[ "$BP_TRAVISCI" == "travis:codecoverage" ]] ; then
     101    bash <(curl -s https://codecov.io/bash)
     102  fi
     103
    93104notifications:
    94105  email: false
Note: See TracChangeset for help on using the changeset viewer.