Continuous Integration
You can easily test your contributions using grunt test
.
The following guide will show you how to set up a free build environment on
Travis, with GitHub integration for pull requests. Paid
alternatives exist for private repositories.
1. Enabling Travis and GitHub
Enabling Travis builds for your GitHub repository is pretty simple:
- Go to your profile on travis-ci.org: https://travis-ci.org/profile/username
- Find the repository for which you’re interested in enabling builds.
- Click the slider on the right so it says “ON” and is a dark grey.
- Optionally configure the build by clicking on the wrench icon. Further
configuration happens in your
.travis.yml
file. More details on that below.
2. The Test Script
The simplest test script simply runs grunt test
and ensures that Workbench
doesn’t fail on style, unit or end-to-end tests.
3. Configuring Your Travis Builds
This file is used to configure your Travis builds. Below is a sample .travis.yml
file, and what follows that is an explanation of each line.
before_install:
- sudo apt-get install npm
install:
- npm install -g grunt grunt-cli
- npm install
script:
- grunt test