How to simulate Travis CI locally?

I am participating in a Python / Flask-based project and must check with the Travis CI build before I submit any work. I find it cumbersome to press, and then wait for the assembly to complete at the end of Travis, check why the tests fail, and then fix, push, lather, rinse and repeat.

Can I run Travis setup locally? Someone already How to run travis-ci locally , but they point to the different components of Travis separately. So far I have been able to install CLI travis-ciand travis-buildas a supplement.

Ideally, I would like my workflow to be:

  • do some work.
  • the server is travis-cirunning locally
  • enter a command, say travis build ~/myrepo, and then it will get out of the docker container and build as if it was being built on the travis-ci.org website, showing me the log in the server control panel.

Can this be done?

+4
source share

All Articles