Travis

Build Stages: Warm up cache

This example has 2 build stages:

  • One job that installs dependencies and warms up the cache for the given branch.
  • Three jobs that run tests, using the cache.

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

cache: bundler

jobs:
  include:
    - stage: prepare cache
      script: true
      rvm: 2.3
    - stage: test
      script: bundle show
      rvm: 2.3
    - stage: test
      script: bundle show
      rvm: 2.3
    - stage: test
      script: bundle show
      rvm: 2.3

This is how the build matrix might look:

image

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