Travis

Build Stages: Defining different steps on different stages

This example has 2 build stages:

  • Two jobs that run different suites of tests against Ruby 2.3.1
  • One job that runs a custom deploy script that doesn’t require running the default install or script steps

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

env:
- TEST_SUITE=integration_tests
- TEST_SUITE=unit_tests

script: bundle exec rake test:$TEST_SUITE

jobs:
  include:
    - stage: deploy
      env: TEST_SUITE=none
      install: skip # bundle install is not required
      script: ./deploy.sh

This is how the build matrix might look:

image

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