Build Stages: Matrix expansion

This example has 2 build stages:

  • Four test jobs that have been expanded from rvm and env matrix keys.
  • One deploy job.

Here’s what the .travis.yml config could look like:

rvm:
  - 2.2
  - 2.3

env:
  - FOO=foo
  - FOO=bar

script: echo $FOO

jobs:
  include:
    - stage: deploy
      script: echo Deploy
      # Keep in mind to overwrite these here
      rvm: 2.3
      env: FOO=foo

This is how the build matrix might look:

image

You can find the code for this example on our demo repository: