Duplicate Build

Hello,

I’m trying to speed up our build, and I’m trying to understand why Travis is duplicating a build in our matrix configuration. The first build specified in the matrix is getting duplicated.

language: ruby

cache: bundler

sudo: required

rvm:
  - 2.2.4

services:
  - docker

if: branch = master OR type = pull_request

env:
  global:
     - TZ=US/Eastern
     - RAILS_ENV=test
     - CC_TEST_REPORTER_ID=<redacted>
     - CC_DOWNLOAD_URL=https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
     - CI=true
     - TEST_RUNNERS=5
     - RUBY_GC_HEAP_INIT_SLOTS=1800000
     - RUBY_HEAP_FREE_MIN=18000
     - RUBY_HEAP_SLOTS_INCREMENT=1000000
     - RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
     - RUBY_GC_MALLOC_LIMIT=1000000000
  matrix:
     - TEST_SUITE=test:units0 test:agents
     - TEST_SUITE=test:units1 test:workers
     - TEST_SUITE=test:units2
     - TEST_SUITE=test:units3 test:functionals
     - TEST_SUITE=test:units4

script: bundle exec rake $TEST_SUITE

before_install:
  - curl -L ${CC_DOWNLOAD_URL} > ./cc-test-reporter
  - chmod +x ./cc-test-reporter
  - ./cc-test-reporter before-build
  - sudo apt-get install libaspell-dev libicu-dev
  - gem install bundler -v 1.17.3
  - git clone --depth 1 git@github.com:customink/oracle-scripts.git
  - source ./oracle-scripts/travis_install.sh
before_script:
  - mkdir -p tmp/cache
  - ./oracle-scripts/wait_for_oracle.sh
  - ./bin/setup
after_script:
  - if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter sum-coverage coverage/codeclimate.*.json fi
  - if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter sum-coverage --output - --parts 6 /tmp/codeclimate-test-coverage*.json | ./cc-test-reporter upload-coverage --input -; fi
  - ./cc-test-reporter after-build -r $CODECLIMATE_REPO_TOKEN --exit-code $TRAVIS_TEST_RESULT

stages:
  - prepare cache
  - test

jobs:
  include:
    - stage: prepare cache
      script: true
      before_script: skip
      after_script: skip
    - stage: test

I’m trying to speed up our build and get code-coverage working in this setup, but the documentation is not helping me whatosever in getting the code-climate coverage report configured, or why I have a duplicate build.


To show the duplicate build