How to Create Travis CI Account and Build your First CI/CD Project

Continuous integration and Continuous delivery or CI/CD is not a new name anymore in DevOps namespace and it is an imperative DevOps tool. There are many IT companies that are currently providing CI/CD services like Jenkins, CircleCI, Travis CI, etc.

This is a very basic article and in this tutorial, we will create a Travis CI account with GitHub (GH) and build our first successful project.

Create Travis CI Account and Build Your First Project

What is Travis CI?

Travis CI is a Germany-based company that helps customer to build and test their apps through their continuous integration platform. Travis CI is free for Open Source and provides paid plans for private code. It also has “Travis CI Enterprise” for customer who wants to run test their code securely on their premises.

Travis CI is written in Ruby and was founded in 2011. If you want to know more about the source code of Travis CI, you can look at their GitHub repo.

How to Create Travis CI Account?

Creating an account in Travis CI is the simplest thing you will do. You just have to click on the ‘Sign up‘ button and it will automatically create your account if you are logged in to your GitHub account or will ask you to log in first.

Travis CI Signup

Once your GitHub account is connected with Travis CI, you will see the below screen. Now you just have to give Travis CI access to your GitHub repository, so that it can test and build from there.

Travis CI get started

At this step just click on “Activate all repositories using GitHub Apps“, which you will take you to the GitHub screen and there you can choose if you want to give access to all the repositories or only a few.

Travis CI Approve and Install

Now once you have authorized and installed Travis CI, it will show all your repository in the dashboard once you sign in again with your GitHub account.

Testing your Code and Building on Travis CI

Once you have your Travis CI dashboard ready, just create a new repository on GitHub if you have not created one already for testing your code.

For creating a new repository, go to your GitHub account and click on the ‘plus‘ sign (it will be on the top-right side) as shown below and create your new repo.

GitHub Create New Repository

GitHub Create new Public Repository

Now once your new public repository is created on GitHub, just got to Travis CI and click on “sync account” under my account tab. This should show your newly created repository. If you are not able to see, do let us know through comments.

Now, its time to add .travis.yml file to your repository, so that Travis can test and build your application.

Note: Travis CI only runs builds on the commits you push after you’ve added a .travis.yml file.

We can start by just creating .travis.yml with a very simple configuration.

So for the first test, we just created a simple .travis.yml file with the below content and knew it will fail.

language: ruby
rvm:
 - 2.2
 - jruby

Travis CI Failed Build

The build got failed as we didn’t provide other supporting commands.

Now, let’s take one fully working “Go language example” from here and test it.

Now once we have cloned this example and pushed it to our repository, Travis CI automatically detected the change and started testing and building the application.

Travis CI Passed Build

So, this is how you test and build your application using continuous integration.


In this tutorial, you learned “how to create a free account at Travis CI, create a new repository on GitHub and run your first successful project“. Please do try other examples and also try to test and build your own software using this platform. If you want to see any other tutorial on Travis CI, do let us know through your comments.

If you like this article, please share it with your friends and colleague and if you want to see more articles on CI/CD, please subscribe to Storage Tutorials by Email.

Buy me a coffeeBuy me a coffee

Add Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.