Tutorial: Integrating Gauge with Travis CI

Travis CI is a hosted, distributed continuous integration service used to build and test software projects hosted at GitHub.

  • Login to Travis CI and goto accounts menu.

  • Choose your project repository to be built and flick that switch on.

Creating tasks

  • Create a .travis.yml file in your project root.
  • Add these lines in .travis.yml according to the platform on which you want to build.
      -  language_name

      - osx

      - brew install gauge
      - gauge install html-report

  script: 'gauge run specs'

  sudo: false
      - language_name
      - linux
      - sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv-keys 023EDB0B
      - echo deb https://dl.bintray.com/gauge/gauge-deb stable main | sudo tee -a /etc/apt/sources.list
      - sudo apt-get update
      - sudo apt-get install gauge
      - gauge install html-report

  script: 'gauge run specs'

  sudo: true
  • If you want to run only a subset of specs, you can use Specify Tags. Example: add script: gauge run --tags "tag1 & tag2" specs in your .travis.yml.
  • Adding a flag -p runs them using Parallel Execution. Example: script: gauge run -p specs in your .travis.yml.
  • Run against specific Environments using the --env flag.
  • See the Manpage <https://manpage.gauge.org> __ for list of all the flags that can be used.


  • Goto your project on travis and see the console output.

    console output
  • Gauge generates html-report after execution whose location can be set by environment variable gauge_reports_dir. This defaults to reports directory in the Gauge project.

  • You can upload Gauge execution reports to your choice of hosted web server. Read more for uploading artifacts.