Edit

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.

Setup

  • Login to Travis CI and goto accounts menu.

  • Choose your project repository to be built and flick that switch on.
    ../../_images/travis_account.png

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.

OS X

language:
    -  language_name

os:
    - osx

install:
    - brew install gauge
    - gauge install html-report

script: 'gauge run specs'

sudo: false

Linux

language:
    - language_name
os:
    - linux
addons:
   apt:
      update: true
      sources:
         - sourceline: "deb https://dl.bintray.com/gauge/gauge-deb stable main"
           key_url: "http://ha.pool.sks-keyservers.net/pks/lookup?search=0x023EDB0B&op=get&options=mr"
      packages:
         - gauge

script: 'gauge run specs'

sudo: true

Reports

  • 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.