Question

I know that there are some default variables for testing with different environments, like the one (for PHP projects) like SYMFONY_VERSION.

My question is simple: would be possible to define a custom variable, for testing with a few specific version of another package (on which I'm depending on)?

I've tried:

env:
  - SYMFONY_VERSION=2.0.*
  - SYMFONY_VERSION=2.1.*
  - BUZZ_VERSION=0.6
  - BUZZ_VERSION=0.*

before_script:
  - composer require symfony/dependency-injection:${SYMFONY_VERSION} 
        kriswallsmith/buzz:${BUZZ_VERSION}

But it doesn't work, I've got a failed build due to "undefined index":

enter image description here

Was it helpful?

Solution

http://about.travis-ci.org/docs/user/build-configuration/#Set-environment-variables

  1. You need both symfony and buzz in one build, so they need to be placed in one line
  2. Wildcard (*) should be quoted

Summing up:

env:
  - SYMFONY_VERSION="2.0.*" BUZZ_VERSION="0.6"
  - SYMFONY_VERSION="2.1.*" BUZZ_VERSION="0.*"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top