问题
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:
script: "./${BUILD}"
- Remove the spaces in the list (
-BUILD=...
)
回答1:
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}
来源:https://stackoverflow.com/questions/34117441/travis-ci-run-scripts-in-parallel