Solution skill
How to run travis-ci locally
Complete solution
Walks through run travis-ci locally, step by step. Use it when you need to do exactly this. Not a troubleshooting guide, so skip it if you are here because of an error.
TL;DR
Run su - travis to begin. Run those commands, in order.
When to use
You are seeing this: This process allows you to completely reproduce any Travis build job on your computer. Use this skill when you run into "How to run travis-ci locally".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
This process allows you to completely reproduce any Travis build job on your computer. Also, you can interrupt the process at any time and debug. Below is an example where I perfectly reproduce the results of job #191.1 on php-school/cli-menu . Prerequisites You have public repo on GitHub You ran at least one build on Travis You have Docker set up on your computer Set up the build environment Reference: https://docs.travis-ci.com/user/common-build-problems/ Make up your own temporary build ID BUILDID="build-$RANDOM" View the build log , open the show more button for WORKER INFORMATION and find the INSTANCE line, paste it in here and run (replace the tag after the colon with the newest available one) : INSTANCE="travisci/ci-garnet:packer-1512502276-986baf0" Run the headless server docker run --name $BUILDID -dit $INSTANCE /sbin/init Run the attached client docker exec -it $BUILDID bash -l Run the job Now you are now inside your Travis environment. Run su - travis to begin. This step is well defined but it is more tedious and manual. You will find every command that Travis runs in the environment. To do this, look for for everything in the right column which has a tag like 0.03s . On the left side you will see the actual commands. Run those commands, in order. Result Now is a good time to run the history command. You can restart the process and replay those commands to run the same test against an updated code base. If your repo is private: ssh-keygen -t rsa -b 4096 -C "YOUR EM
Context: I'd rather not have to push every little change to .travis.yml and every little change I make to the source in order to run the build. With jenkins you can download jenkins and run locally. Does travis offer something like this? Note: I've seen the travis-ci cli and downloaded it, but all it seems to do is call their API, which then connects to my GitHub repo, so if I don't push, it won't matter that I restart the last build.
Evidence
Source: I'd rather not have to push every little change to .travis.yml and every little change I make to the source in order to run the build. With jenkins you can download jenkins and run locally. Does travis offer something like this? Note: I've seen the travis-ci cli and downloaded it, but all it seems to do is call their API, which then connects to my GitHub repo, so if I don't push, it won't matter that I restart the last build.
Verified resolution: This process allows you to completely reproduce any Travis build job on your computer. Also, you can interrupt the process at any time and debug. Below is an example where I perfectly reproduce the results of job #191.1 on php-school/cli-menu . Prerequisites You have public repo on GitHub You ran at least one build on Travis You have Docker set up on your computer Set up the build environment Reference: https://docs.travis-ci.com/user/common-build-problems/ Make up your own temporary build ID BUILDID="build-$RANDOM" View the build log , open the show more button for WORKER INFORMATION and find the INSTANCE line, paste it in here and run (replace the tag after the colon with the newest available one) : INSTANCE="travisci/ci-garnet:packer-1512502276-986baf0" Run the headless server docker run --name $BUILDID -dit $INSTANCE /sbin/init Run the attached client docker exec -it $BUILDID bash -l Run the job Now you are now inside your Travis environment. Run su - travis to begin. This step is well defined but it is more tedious and manual. You will find every command that Travis runs in the environment. To do this, look for for everything in the right column which has a tag like 0.03s . On the left side you will see the actual commands. Run those commands, in order. Result Now is a good time to run the history command. You can restart the process and replay those commands to run the same test against an updated code base. If your repo is private: ssh-keygen -t rsa -b 4096 -C "YOUR EM
Source URL: https://stackoverflow.com/questions/21053657/how-to-run-travis-ci-locally
By @issueatlas · Version 3 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_E6LsqtlBGSDhbVRlnuAuUA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">How to run travis-ci locally <span>— Vectle</span></a>