Travis and matrix combinations

Sergio picture Sergio · Mar 14, 2014 · Viewed 9.7k times · Source

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?

Answer

phadej picture phadej · Jun 22, 2014

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