Initializing Travis CLI on a project

The init command will help you set up Travis CI in a project by generating a .travis.yml script for you. We have set up a new project in GitHub called travis-init-command (https://github.com/packtci/travis-init-command). We will use the init command to set up Golang in this repository:

The steps in the process are as follows:

  1. The first step is to use the sync command so that Travis CI is aware of this new repository
  2. Next we will enable this new repository in Travis CI
  3. Next we will try to create a .travis.yml script with Golang, but notice that it is not recognized, so we try again with Go and it succeeds ...

Get Hands-On Continuous Integration and Delivery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.