Nathan H
Nathan H

Reputation: 49371

Travis CI run scripts in parallel

My Travis YML runs 3 scripts that are not dependent on each other.

I'd like to run them in parallel to increase speed.

Following this article: https://docs.travis-ci.com/user/speeding-up-the-build/

I modified my _travis.yml as such:

language: ruby
cache: bundler
env:
  - BUILD=buildPDF.sh
  - BUILD=buildPages.sh
  - BUILD=buildHosting.sh
script: "./$BUILD"

When Travis runs I get the error The command "./$BUILD" exited with 126.

Things I've tried so far:

Upvotes: 2

Views: 1959

Answers (1)

DurkoMatko
DurkoMatko

Reputation: 5844

You need to put name of your scripts in quotes and then put $BUILD variable into curly braces as @набиячлэвэли suggested. Following worked for me:

env:
- TEST_SUITE="travis-job-codecov-linter.sh"
- TEST_SUITE="travis-job-cypress-boxes.sh"
- TEST_SUITE="travis-job-cypress-products.sh"
- TEST_SUITE="travis-job-cypress-signup.sh"
- TEST_SUITE="travis-job-cypress-controls.sh"
- TEST_SUITE="travis-job-build.sh"
script: ./${TEST_SUITE}

Upvotes: 1

Related Questions