Question

I want to test different builds of my .js framework against many browsers

I expected to write something like:

language: node_js
node_js:
- 0.11
env:
  matrix:
    - BUILD='nocompat'
    - BUILD='compat'
    - BUILD='default'

    - BROWSER='ie6'
    - BROWSER='ie7'
    # etc... about total 15 browsers/platforms

But the only way I got it working was specifying all combinations "by hand"...

Like:

env:
  matrix:
    - BROWSER='chrome_linux'    BUILD='default'
    - BROWSER='chrome_linux'    BUILD='compat'
    - BROWSER='chrome_linux'    BUILD='nocompat'
    - BROWSER='firefox'         BUILD='default'
    - BROWSER='firefox'         BUILD='compat'
    - BROWSER='firefox'         BUILD='nocompat'

    # etc ... and this is about 50 lines!

Is there another way to do this? Or is this the right way?

Était-ce utile?

La solution

Looks like you can't DRY right now: travis-ci issue #1519

Autres conseils

I believe the syntax for travis-build matrix environmental variables is:

env:
  - STUFF=true
  - STUFF=false

The env: matrix: is used for specifying variables that stay in the build matrix when you have a env:global for variables that aren't used for the build matrix.

You can read up more on matrices here. As a note, 50 seperate builds for your project is a little crazy, in fact, I'm not sure travis-ci supports 50 different builds in a matrix. I would narrow it down to about 10-20 personally.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top