Travis CI script breakdown
Now that we have gone over YAML syntax, we can explain in more detail the various parts of the Travis CI script.
Select a programming language
language: go
In this block of the .travis.yml
script we add the programming language that we will be using in the continuous integration build. This is usually the first entry in the .travis.yml
script that you add.
Travis CI supports many programming languages such as:
- C
- C++
- JavaScript with Node.js
- Elixir
- Go
- Haskell
- Ruby
You can look at languages (https://docs.travis-ci.com/user/languages) in the Travis CI docs for a complete list of supported programming languages.
Selecting infrastructure
You can set a more customized environment in Travis CI by using the sudo
and dist
fields in the YML script.
Virtual image with Ubuntu Precise (12.04) infrastructure
You can use Ubuntu Precise infrastructure by using the following entries in the Travis YML script:
sudo: enabled
dist: precise
Default infrastructure
You can explicitly set the...