Travis CI : How to allow failures with a customized environment variable? -


following this answer, wrote travis configuration file :

language: php  php:     - 5.3     - 5.4     - 5.5     - 5.6     - 7     - hhvm     - nightly  branches:     only:         - master         - /^\d+\.\d+\.\d+$/  matrix:     fast_finish: true     include:         - php: 5.3           env: deps="low"         - php: 5.5           env: symfony_version=2.3.*         - php: 5.5           env: symfony_version=2.4.*         - php: 5.5           env: symfony_version=2.5.*         - php: 5.5           env: symfony_version=2.6.*         - php: 5.5           env: symfony_version=2.7.*         - php: 5.5           env: symfony_version=2.8.*@dev test_group=canfail     allow_failures:         - php: nightly         - env: test_group=canfail  before_script:     - composer self-update     - if [ "$symfony_version" != "" ]; composer require --dev --no-update symfony/symfony=$symfony_version; fi     - if [ "$deps" = "low" ]; composer update --prefer-lowest; fi     - if [ "$deps" != "low" ]; composer update --prefer-source; fi  script: phpunit 

but travis ci counts php nightly version "allowed fail" version. using environment variables in wrong way ?


update

just precision, know can directly write environment that:

matrix:     include:         - php: 5.5           env: symfony_version=2.8.*@dev     allow_failures:         - env: symfony_version=2.8.*@dev 

but still don't why other way doesn't work.

what specify in allow_failures: allowed failures

"you can define rows allowed fail in build matrix. allowed failures items in build matrix allowed fail without causing entire build fail. lets add in experimental , preparatory builds test against versions or configurations not ready officially support."

unfortunately, believe way matrix reads first set of code php nightly version "allowed fail" version environment part of nightly.

because of how travis allows failures must exact match, can not specify env: allowed failure have specify each php version env: want allow failure example

allow_failures:   - php: 5.3     env: symfony_version=2.8.*@dev test_group=canfail   - php: 5.4     env: symfony_version=2.8.*@dev test_group=canfail   - php: 5.5     env: symfony_version=2.8.*@dev test_group=canfail   - php: 5.6     env: symfony_version=2.8.*@dev test_group=canfail   - php: 7.0     env: symfony_version=2.8.*@dev test_group=canfail   - php: hhvm     env: symfony_version=2.8.*@dev test_group=canfail   - php: nightly # allow tests fail nightly 

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -